檢視apache2的命令 httpd -v其中httpd_root和server_config_file 就可以確定httpd.conf的路徑了
假設當前linux使用者的apahce安裝目錄為/usr/local/apache2,那麼在命令列終端中使用以下命令啟動,停止和重啟apache。
1. 啟動apahce的命令:
/usr/local/apache2/bin/apachectl start apache
2. 停止apache的命令:
/usr/local/apache2/bin/apachectl stop
3. 重啟apache的命令:
/usr/local/apache2/bin/apachectl restart
要在重啟 apache 伺服器時不中斷當前的連線,則應執行:
/usr/local/sbin/apachectl graceful
如果當前使用者的apache已經安裝為linux的服務的話,可以使用以下命令進行以上操作。
1. 啟動apache
2. 停止服務apache
3. 重新啟動apache
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
linux 下 apache啟動 停止 重啟命令
基本的操作方法 本文假設你的apahce安裝目錄為 usr local apache2,這些方法適合任何情況 apahce啟動命令 推薦 usr local apache2 bin apachectl start apaceh啟動 apache停止命令 usr local apache2 bin a...
linux 下 apache啟動 停止 重啟命令
基本的操作方法 本文假設你的apahce安裝目錄為 usr local apache2,這些方法適合任何情況 apahce啟動命令 推薦 usr local apache2 bin apachectl start apaceh啟動 apache停止命令 usr local apache2 bin a...
linux 下 apache啟動 停止 重啟命令
基本的操作方法 本文假設你的apahce安裝目錄為 usr local apache2,這些方法適合任何情況 apahce啟動命令 推薦 usr local apache2 bin apachectl start apaceh啟動 apache停止命令 usr local apache2 bin a...