Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

For some reason, Apache is not generating logs in /var/log/httpd/access_log. How do I see if logging enabled?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Unless you're piping to a program (like, e.g., cronolog), here's a handy trick for finding log files:

for pid in $(pidof httpd); do ls -l /proc/$pid/fd; done | awk '/^l/ {print $11}' | sort | uniq

If you are using a program like cronolog, just swap out "httpd" in favor of "cronolog" in the above example.

share|improve this answer
add comment

This is presumably the same on Centos.

In each vhost file you can add:

CustomLog /var/log/apache2/default_http_access_log combined

That one above is for 001-default the HTTP default vhost (not SSL) and I just change them per vhost and this is the catch all.

share|improve this answer
    
Otherwise check /var/log/httpd permissions. –  Jonathan Ross Apr 10 '11 at 15:06
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.