Notes:-
configuration --> /etc/httpd/conf/httpd.conf
/usr/local/apache/domlogs/sutename -> domain log files are stored here
libexec --> shared object(.so) files are stored eg libphp4.so,mod_rewrite.so
Restart commands
/etc/rc.d/init.d/httpd restart
/scripts/restartsrv_httpd -> cpanel script restart option
APACHE CONNECTIONs
To check the number of connections to port 80:
netstat -alntp | grep :80 | wc -l
To List the remote IPs connecting to your server on port 80:
netstat -alntp | grep :80 | awk ‘{print $5}’ | cut -d: -f1 | sort
To List the uniq remote IPs and the number of connections from particular IP:
netstat -alntp | grep :80 | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -n
To find out apache down time
To find the location for httpd.pid
# ll -d /usr/local/apache/logs/httpd.pid
How to find out when apache last restarted
# ll /usr/local/apache/logs/httpd.pid
Apache config test, for test whether your apache settings are correct before restarting
#apachectl configtest
No comments:
Post a Comment