How to restart Apache Server in Linux using Command Line Terminal

Restart Apache Server in Linux using command line terminal, is just matter of executing commands through terminal in linux, mac or putty in windows. But for different operating systems these commands are different. Here we have commands for all major server operating systems like CentOs, Ubuntu, Redhat and other operating systems.

1

In centos

This below command is used to start the apache server in Centos.

sudo service httpd start

This below command is used to stop the apache server in Centos.

sudo service httpd stop

This below command is used to restart the apache server in Centos.

sudo service httpd restart
2

In Ubuntu

This below command is used to start the apache server in Ubuntu.

sudo service apache2 start

This below command is used to stop the apache server in Ubuntu.

sudo service apache2 stop

This below command is used to reload the apache server in Ubuntu.

sudo service apache2 reload

This below command is used to restart the apache server in Ubuntu.

sudo service apache2 restart
3

In Redhat

This below command is used to start the apache server in Redhat.

/etc/init.d/httpd start

This below command is used to stop the apache server in Redhat.

/etc/init.d/httpd stop

This below command is used to restart the apache server in Redhat.

/etc/init.d/httpd restart

Vivek Vengala
 

Vivek Vengala is a Online Entrepreneur, Web Developer from Hyderabad India.

Click Here to Leave a Comment Below 0 comments

Leave a Reply:

x

Join My Facebook Group to Receive Coding Tutorial for Free

email-subsribe