Apache - Cheatsheet

By xngo on November 24, 2019

# Get status of Apache server.
    systemctl status apache2
 
# Stop Apache server.
    systemctl stop apache2
    apache2 stop
    apachectl -k stop
 
# Start Apache server.
    systemctl start apache2
    apache2 start
 
# Restart Apache server.
    systemctl restart apache2
    apache2 restart
    apachectl -k restart
    apachectl -k graceful
 
# Start it with specific httpd.conf.
    apachectl -f /path/to/your/httpd.conf
    apachectl -f /usr/local/apache2/conf/httpd.conf
 

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.