Prevent directory listing
Add following line in .htaccess
Options -Indexes
Apache Commands
These commands are for centOS which might work on other Linux versions but you will have to check the path if it doesn’t work.
Check Apache StatusĀ /etc/init.d/httpd status
Restart Apache inĀ /sbin/service httpd restart
Start Apache inĀ /sbin/service httpd start
Stop ApacheĀ /sbin/service httpd stop
Apache Log Rotation Configuration
This will allow logs to be archived once they exceed the threshold.
From WHM >>Ā Service Configuration >> Apache Configuration >> Log RotationĀ you can specify which logs to be archived.
Apache Log Threshold
The threshold settings can be changed from WHM >> Server Configuration >> Tweak Settings
search forĀ rotatelogs_size_threshhold_in_megabytes variable
By default this value is 300MB.
Disable Apache Auto Restart after every 2 hours (or so)
By default Apache restarts every 2 hours (or so) and every 24 hours. This is done automatically in order for Apache to grab new file handles for logs.
The auto restart can be disabled by enabling piped logging from WHP->Apache Configuration->Enable Piped Apache Logs
More details on this threadĀ http://forums.cpanel.net/f5/why-apache-restarting-every-two-hours-254022.html
Leave a Reply