How to restart apache services in unix?

Often times, as server administrator, have to telnet or SSH to their server to restart the Apache Http services. The Apache http services are usually located at the following location,

1) init.d start script folder.

issue “./apache restart” to restart it


debian:/etc/init.d# ./apache restart
Forcing reload of web server (apache)... waiting .
debian:/etc/init.d# 

2) usr/local/apache/bin

issue “./apachectl restart” to restart it


debian:/usr/local/apache/bin# ./apachectl restart
Forcing reload of web server (apache)... waiting .

P.S Your may need sudo privileged to restart the Apache services, and the Apache service name (apache2, apachectl) may vary in server

Where is my Apache installation folder?

How about you do not remember where is your Apache installation folder? Just issue the following command to find it out.


find . -name apache

mkyong

Founder of Mkyong.com, passionate Java and open-source technologies. If you enjoy my tutorials, consider making a donation to these charities.

0 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments