基本的操作方法:
本文假設你的 apahce 安裝目錄為/usr/local/apache2,這些方法適合任何情況
apahce 啓動命令:
推薦/usr/local/apache2/bin/apachectl start apaceh 啓動
apache 停止命令
/usr/local/apache2/bin/apachectl stop 停止
apache 重新啓動命令:
/usr/local/apache2/bin/apachectl restart 重啓
要在重啓 Apache 站羣服務器時不中斷當前的連線,則應執行:
/usr/local/sbin/apachectl graceful
如果 apache 安裝成為 linux 的服務的話,可以用以下命令操作:
service httpd start 啓動
service httpd restart 重新啓動
service httpd stop 停止服務
Linux 系統為 Ubuntu
一、 Start Apache 2 Server /啓動 apache 服務
# /etc/init.d/apache2 start
or
$ sudo /etc/init.d/apache2 start
二、 Restart Apache 2 Server /重啓 apache 服務
# /etc/init.d/apache2 restart
or
$ sudo /etc/init.d/apache2 restart
三、 Stop Apache 2 Server /停止 apache 服務
# /etc/init.d/apache2 stop
原博客網站連線:http://xiaofengjava.iteye.com/blog/2316380