原文地址:點擊打開鏈接
基本的操作方法:
本文假設你的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
or
$ sudo /etc/init.d/apache2 stop