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 ]
Advertisements
Try Out Code2care Dev Tools:

Advertisements



#Android #Java #Linux #Microsoft #Google #Python #MacOS #Notepad++ #Microsoft Teams #CSS #PHP #SharePoint #Html #Linux #C-Program #Bootstrap #jQuery #Sublime #Android-Studio #Facebook #Eclipse #WhatsApp #News #MySQL #Json #HowTos #JavaScript #FTP #S3


Advertisements


Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Tutorials, Trouble-Shooting steps, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.
🎉 We are celebrating the 10th years of Code2care! Thank you for all your support! We hope we made a difference.
We strong support Gender Equality & Diversity.

We stand in solidarity with Ukraine - Make a donation to UNHCR - https://donate.unhcr.org/in/en-in/ukraine-emergency