Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

For some reason i don't understand, after creating a new virtual host / domain in Plesk a few months back, i cannot seem to find the access log.

I noticed this when running

/usr/local/psa/admin/sbin/statistics

The host in question is being scanned

Main HTML page is 'awstats.<hostname_masked>-http.html'.
Create/Update database for config "/opt/psa/etc/awstats/awstats.<hostname_masked>.com-https.conf" by AWStats version 6.95 (build 1.943)
From data in log file "-"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Jumped lines in file: 0
Parsed lines in file: 0
 Found 0 dropped records,
 Found 0 corrupted records,
 Found 0 old records,
 Found 0 new qualified records.

So basically no access logs have been parsed/found. I then went on to check if i could find the log myself.

I looked in

/var/www/vhosts/<hostname_masked>.com/statistics/logs

but all i find is

error_log

Does anybody know what is wrong here and perhaps how i could fix this?

Note: in the

<hostname_masked>.com/conf/

folder i keep a custom vhost.conf file, which however contains only some rewrite conditions plus a directory statement that contains php_admin_flag and php_admin_value settings. None of them are related to logging though.

share|improve this question
add comment

2 Answers 2

If no customizations applied, access_log should be exactly in /var/www/vhosts/<hostname_masked>.com/statistics/logs

I would try to check the following

  1. You really have visitors to the site
  2. Check that you have this line in /var/www/vhosts/<hostname_masked>.com/last_httpd.include:

    ErrorLog "/var/www/vhosts/domain.com/statistics/logs/error_log"

  3. Check content of /var/log/httpd/access_log
  4. Check logrotation policy (available in Plesk UI) and increase period / size to rotate
share|improve this answer
    
Thanks for your answer. The site has visitors, definitely - its a shop and many orders have come in. I cannot find a last_httpd.include. The error log works just fine. Your hint for /var/log/httpd/access_log was pretty good as i was able to find access logs in /var/log/apache2/ but there are multiple tar.gz archives in there and its quite a mess. Using |grep i was able to find <hostname_masked> in what cat * had returned in that folder, but i have no idea how to get all the data from the last few months. I wonder why Plesk is not saving those logs to the actual vhosts log dir :( –  Cummander Checkov Oct 3 '12 at 14:08
    
May be you need to call support. Normally access_log should be in vhost directory. –  Sergey L Oct 5 '12 at 5:23
    
Thank You. There is no support :) –  Cummander Checkov Oct 5 '12 at 9:01
add comment
up vote 0 down vote accepted

I was able to find access log data in /var/log/apache2/

It was not ordered correctly and it was zipped up due to logration features.

In any case, adding this line to my vhost.conf in /var/www/vhosts//conf/

CustomLog /var/www/vhosts/<hostname_masked>/statistics/logs/ combined

turned out to solve the logging issue for this specific VirtualHost.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.