開心生活站

位置:首頁 > IT科技 > 

linux,apachectl命令詳解

IT科技3.2W

1、apachectl命令簡介:apachectl指令是apache http伺服器的前端控制程式,可以協助控制apache服務的守護程序httpd,此命令的適用範圍:RedHat、RHEL、Ubuntu、CentOS、SUSE、openSUSE、Fedora。

2、補充說明:

apachectl是slackware內附Apache HTTP伺服器的script檔案,可供管理員控制伺服器,但在其他Linux的Apache HTTP伺服器不一定有這個檔案。

3、語法:

apachectl [configtest][fullstatus][graceful][help][restart][start][status][stop] 

4、引數: 

configtest檢查設定檔案中的語法是否正確;

fullstatus顯示伺服器完整的狀態資訊;

grace補充說明。

舉例:

執行apache配置檔案測試 ,輸入命令:

[root@localhost ~]# apachectl configtest            //配置檔案檢測,沒有錯誤

httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for 

ServerName

Syntax OK

linux apachectl命令詳解