Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache restart

Status
Not open for further replies.

aaronah

Technical User
Sep 30, 2004
3
0
0
GB
How can i restart apache from the linux command line??
 
apachectl start/stop/restart

for my version, do a find . -name "apache"
which is normally in /usr/local/apache
The bin directory should have the script for start

also can look at the startup stuff in /etc/rc?
different unix's do it a little different.
 
Depending on your disto there is probably an init script either in /etc/rc, as cdlvj states, or in /etc/init.d. On a Redhat/Fedora system you can control the initscripts with "/sbin/service httpd start" or "/sbin/service httpd restart", etc.

These scripts usually call apachectl, but I point out the init scripts because sometimes they have additional configuration that could get overlooked. For example, "apachectl restart" is the equivalent of "apachectl stop ; apachectl start", but our webserver requires "apachectl startssl". "service httpd restart" takes that into account and does The Right Thing(tm).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top