David Asked: 2011-04-11 06:59:19 +0800 CST2011-04-11 06:59:19 +0800 CST 2011-04-11 06:59:19 +0800 CST Apache not generating access log. CentOS 772 For some reason, Apache is not generating logs in /var/log/httpd/access_log. How do I see if logging enabled? centos apache-2.2 2 Answers Voted Best Answer BMDan 2011-04-11T07:16:01+08:002011-04-11T07:16:01+08:00 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. Jonathan Ross 2011-04-11T07:06:07+08:002011-04-11T07:06:07+08:00 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.
Unless you're piping to a program (like, e.g., cronolog), here's a handy trick for finding log files:
If you are using a program like cronolog, just swap out "httpd" in favor of "cronolog" in the above example.
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.