Friday, June 26, 2020

How To Start, Stop, And Restart ,Reload, Apache2 Web Server


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Apache HTTP server is the most popular web server in the world. It is a free, open-source, and cross-platform HTTP server providing powerful features that can be extended by a wide variety of modules.

If you are a developer or system administrator, chances are that you’re dealing with Apache regularly.


In this Tutorial, we will go over the most important and frequently used Apache commands, including starting, stopping, and restarting Apache

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Testing Environment:Ubuntu 20.04 LTS  Hostname - www.yourdomain.com  - ip Address - 192.168.1.20

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Check Apache version#   apache2 -v


Start Apache# systemctl start apache2        Or service apache2 start      Or sudo /etc/init.d/apache2 start

Stop Apache#  systemctl stop apache2         Or service apache2 stop       Or sudo /etc/init.d/apache2 stop


Restart Apache# systemctl restart apache2   Or service apache2 restart   Or sudo /etc/init.d/apache2 restart

Reload Apache# systemctl reload apache2     Or service apache2 reload    Or sudo /etc/init.d/apache2 reload


View server status# systemctl status apache2 Or service apache2 status   Or sudo /etc/init.d/apache2 status


Enable Apache Service# systemctl enable apache2


Check Apache Configuration Syntax Errors# apachectl -t


Show command help#     systemctl -h apache2   Or service apache2 -?

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

No comments:

Post a Comment