1

I have a brand new vps server with Ubuntu 14.04, i686, Apache 2.4.7, php 5.5.9

here's my virtual host:

<VirtualHost *:80>
ServerName example.com

DocumentRoot "/home/drake/www/"

DirectoryIndex index.php
ErrorDocument 404 /404.html

ErrorLog /home/drake/logs/error.log
CustomLog /home/drake/logs/access.log combined

</VirtualHost>

ls -la /home/drake/logs:

drwxrwxr-x 2 root root 4096 Apr 29 23:30 .
drwxrwxr-x 2 root root 4096 Apr 29 23:30 ..

I have a php file index.php:

<?php
ecoja a3ad

I want to test the log files and nothing gets saved.

in my php.ini i have:

error_repoting E_ALL
display_errors = On
log_errors = On
error_log = /home/drake/logs/php_error.log

Why I dont see any logs?

Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47
Timmy
  • 109
  • 3

1 Answers1

1

With Apache Apache/2.4.7 you might need to simply restart the service.

sudo apache2ctl graceful

or

sudo /etc/init.d/apache2 reload

You also might create the file manually:

touch /home/drake/logs/error.log

Change the permissions:

chown "MYAPACHEUSER": /home/drake/logs/error.log

Make sure the path: /home/drake/logs has write access.

chmod +rw /home/drake/logs/error.log

Also, double check to make sure the /var/log/apache2/error.log contains something, maybe they still go there.

Now, if you remove or move the file, you need to restart the service. I recommend graceful first.

Book Of Zeus
  • 1,341
  • 13
  • 16