jeff1evesque / LeQue

Activate installed microphone, and analyze sound input
13 stars 2 forks source link

Determine Apache2 error.log Functionality #385

Closed jeff1evesque closed 9 years ago

jeff1evesque commented 9 years ago

We previously removed the contents of error.log using a text editor, and saving it. The error.log file no longer records errors:

$ cd /var/log/apache2
$ apachectl restart
[Wed Jul 30 02:44:30.409489 2014] [alias:warn] [pid 8643] AH00671: The Alias directive in /etc/phpmyadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias.
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
httpd not running, trying to start
(13)Permission denied: AH00072: make_sock: could not bind to address [::]:80
(13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'restart' failed.
The Apache error log may have more information.
$ ls -l
total 20
-rw-r----- 1 root adm 20343 Jul 30 02:28 access.log
-rw-r----- 1 root adm     0 Jul 30 01:43 error.log
-rw-r----- 1 root adm     0 Jul 27 09:34 other_vhosts_access.log

IRC #httpd (07/30/14 ~ 2:40am EST):

jeffreylevesque: Unbeliever: I have suspicion that my error.log no longer logs errors. I previously removed it's content entirely with 'pico' and saved the file. I am not sure if it logs error now - https://github.com/jeff1evesque/audio-analyzer/issues/372#issuecomment-50567870

Unbeliever: jeffreylevesque: issue an "apachectl restart" you should see a restart message in your error log Unbeliever: jeffreylevesque: and editing open files is a bad idea

jeff1evesque commented 9 years ago

Now, we run the following:

$ cd /var/log/apache2
$ ls -l
total 20
-rw-r----- 1 root adm 20343 Jul 30 02:28 access.log
-rw-r----- 1 root adm     0 Jul 30 02:56 error.log
-rw-r----- 1 root adm     0 Jul 27 09:34 other_vhosts_access.log
$ sudo apachectl restart
[sudo] password for jeffrey: 
[Wed Jul 30 02:54:36.194945 2014] [alias:warn] [pid 8910] AH00671: The Alias directive in /etc/phpmyadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias.
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
$ ls -l
total 24
-rw-r----- 1 root adm 20343 Jul 30 02:28 access.log
-rw-r----- 1 root adm   739 Jul 30 02:56 error.log
-rw-r----- 1 root adm     0 Jul 27 09:34 other_vhosts_access.log

and, open error.log to find it was able to generate error logs:

[Wed Jul 30 02:56:20.397673 2014] [mpm_prefork:notice] [pid 1342] AH00173: SIGHUP received. Attempting to restart [Wed Jul 30 02:56:20.415881 2014] [alias:warn] [pid 1342] AH00671: The Alias directive in /etc/phpmyadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias. AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message [Wed Jul 30 02:56:20.432828 2014] [mpm_prefork:notice] [pid 1342] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.3 configured -- resuming normal operations [Wed Jul 30 02:56:20.432875 2014] [core:notice] [pid 1342] AH00094: Command line: '/usr/sbin/apache2'