• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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