• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

subdomain logfiles

W

webinmotion

Guest
I must have subdomains log http access and errors to thier own custom log files (a different log than the parent domain)

does anyone know how to do this?
 
You can try putting customlog directive in the subdomain's vhost.conf and vhost_ssl.conf files.

CustomLog Directive
Description: Sets filename and format of log file
Syntax: CustomLog file|pipe format|nickname [env=[!]environment-variable]
Context: server config, virtual host
Status: Base
Module: mod_log_config

http://httpd.apache.org/docs/2.0/mod/mod_log_config.html#customlog

After any modification to vhost or apache files, remember to use

/usr/local/psa/admin/bin/websrvmng -u --vhost-name=domain.tld

then restart apache.

The subdomain's conf files should be located at:

/home/httpd/vhosts/maindomain.tld/subdomains/subdomname/conf

The vhost.conf and vhost_ssl.conf files are not normally created by default, so you may have to create them from scratch.
 
Thanks, this looks good, I had limited success with a LogFile directive in the subdomain's vhosts.conf file.

here is what I have,

# CustomLog with format nickname
LogFormat "%h %l %u %t \"%r\" %>s %b" common
CustomLog /vhome/[domain]/statistics/logs/access_log-[doamin[ common

- does not work, do I need to enclose this in a context?

One question, is the vhosts.conf included withing the virtual domain context or after, I was never clear on where plesk included these files.
 
has anyone ever been able to create a separate logfile for a subdomain? The above does not work, it just gets ignored.

What I am trying to do is set up awastats for a subdomain only, no matter how I configure it it ignores the fact that I have told it to look only for the subdomain and it processes the entire log.

- anyone?
 
Back
Top