How to stop/start/restart apache server using command [Ubuntu]


Stop Start or Restart Apache Server on Ubuntu

If you have web application hosted on apache HTTP web server on a Linux server (say Ubuntu) and you want to know how to stop/start or restart the server, you can follow the below commands,

1. Command to start apache server:

# sudo service apache2 start

 * Starting Apache httpd web server apache2

AH00558: apache2: Could not reliably determine the server's 
fully qualified domain name, using 172.17.0.2. 
Set the 'ServerName' directive globally to suppress this message *

2. Command to stop apache server:

# sudo service apache2 stop 

 * Stopping Apache httpd web server apache2 *

3. Command to restart apache server:

# # sudo service apache2 restart

 * Restarting Apache httpd web server apache2

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, 
using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
[ OK ]

Top Hashtags:

Advertisements

Advertisements




Advertisements