View Full Version : [ubuntu] Disable logging in Apache 2 Ubuntu 9.04
headlice
September 5th, 2009, 03:13 AM
Hi,
How do i go about disabling logging in Apache2?
I edited /etc/apache2/apache2.conf and commented out all lines of logging, yet apache2 wont start.
It says this:
Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
(2)No such file or directory: apache2: could not open error log file /etc/apache2/logs/error_log.
How is it looking for an error log when I commented out the logging?
Thanks!
bear24rw
September 5th, 2009, 03:20 AM
try removing these lines:
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
from
/etc/apache2/site-enabled/000-default
no idea if that will work but worth a shot
headlice
September 5th, 2009, 03:28 AM
Did it. Didnt work. Same error message......
bear24rw
September 5th, 2009, 03:29 AM
did you add the stuff back into the config when you first got the error message?
headlice
September 5th, 2009, 03:36 AM
did you add the stuff back into the config when you first got the error message?
All I did was comment it out, so it is there but just commented.
The reason why I dont want logging is because it is on a solid state disk and have my /var/log directory mounted on tmpfs.
Hmmmm, would I be able to point the logs to tmpfs?
bear24rw
September 5th, 2009, 03:38 AM
The reason why I dont want logging is because it is on a solid state disk and have my /var/log directory mounted on tmpfs.
wait, if your alreading running them on a tmpfs whats the problem, they are writing to ram not your ssd..
headlice
September 5th, 2009, 03:42 AM
wait, if your alreading running them on a tmpfs whats the problem, they are writing to ram not your ssd..
so wait, I dont have to manually point logs to tmpfs? Everything that is pointing at /var/log will find it in tmpfs?
bear24rw
September 5th, 2009, 03:43 AM
Yeah it should if your mounted /var/log to a ram disk..
headlice
September 5th, 2009, 03:47 AM
Yeah it should if your mounted /var/log to a ram disk..
I do have it mounted there, but it may not be working because if it ever gets shut down, /var/logs/[whatever is after this] gets erased.
.....
I think I know what to do!
Ill specify /var/log/apache2 to mount to tmpfs in /etc/fstab
bear24rw
September 5th, 2009, 03:49 AM
it supossed to get erased.. its in ram..
headlice
September 5th, 2009, 03:52 AM
it supossed to get erased.. its in ram..
right, but all I have specified to mount in tmpfs is /var/log
apache is looking for /var/log/apache2 to put the logs in. If I install apache, it runs just fine because it creates /var/log/apache2
but when I reboot, /var/log/apache2 is gone and throws the error.
To remedy this, Ill specify /var/log/apache2
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.