November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Apache commands

Apache commands

#!/bin/sh
echo “————————”
echo “Verify Configuration”
echo “————————”
/opt/apache/bin/httpd -f /opt/apacheconf/httpd.conf -t -S

echo “————————”
echo “Start Apache”
echo “————————”

/opt/apache/bin/httpd -f /opt/apacheconf/httpd.conf -k start

echo “————————”
echo “List HTTP Processes”
echo “————————”
sleep 3
ps -ef | grep http

Custom script to stop Apache (stop_apache.sh)
#!/bin/sh

echo “————————”
echo “Stop Apache”
echo “————————”
/opt/apache/bin/httpd -f /opt/apacheconf/httpd.conf -k stop

echo “————————”
echo ” List HTTP Processes”
echo “————————”
sleep 3
ps -ef | grep http

rm /opt/apachelogs/*

List statically compiled modules
/opt/apache/bin/httpd -l or /opt/apache/bin/apachectl -l

Which mpm is used by apache?
/opt/apache/bin/apachectl -l

List all loaded modules
/opt/apache/bin/httpd -t -D DUMP_MODULES

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>