I'd like to know where can I find apache's error log. According to a website that I read, it should be at /var/log/httpd/error_log But I don't have the httpd directory on /var/log
Asked
Active
Viewed 1.1e+01k times
20
-
It is where you described it. Probably you never started apache and therefore this directory did not get created. Or you have you custom build configuration. Did you maybe install some hosting control panel software? – Raffael Luthiger Oct 08 '10 at 22:13
3 Answers
12
Check your httpd.conf
The LogFile variable tells you where apache is writing logs. This value is often (always?) relative to the ServerRoot variable.
tim
- 516
11
Chances are it's in /var/log/httpd.
Do you have locate installed? Have you run updatedb recently, or have it cronified? If so, you can do locate error_log.
Andy Lester
- 750
4
take a look at your /etc/httpd.conf file and check where you are writing your logs valter. as Raffael says it maybe that you've got them being written to odd locations. check that your httpd server actually started too! :-)
Khushil
- 563
- 3
- 12
-
I found the following line on httpd.conf, in other server: ErrorLog logs/error_log – valter Oct 08 '10 at 22:42
-
2check in /etc/logs or /var/logs or set a full path there '/var/logs/httpd/error_log' – Khushil Oct 08 '10 at 22:56
-
@Khushil could you explain to us why the config file says
logs/error_logbut the actual log files goes to/var/logs/...? – Lucas Pottersky Sep 09 '16 at 18:48 -
@LucasPottersky There should be a comment in httpd.conf stating that ServerRoot is prepended to paths like
logs/error_log. That likely points to/etc/httpd, which should contain symlinks to/var/logs/.... – George Marian May 25 '17 at 21:40