Linux httpd命令詳解 Linux httpd命令怎麼 用

來源:互聯網
上載者:User

httpd為Apache HTTP伺服器程式。直接執行程式可啟動伺服器的服務。

文法

httpd [-hlLStvVX][-c<httpd指令>][-C<httpd指令>][-d<伺服器根目錄>]

[-D<設定檔案參數>][-f<設定檔案>]

參數說明:

  • -c<httpd指令> 在讀取設定檔前,先執行選項中的指令。
  • -C<httpd指令> 在讀取設定檔後,再執行選項中的指令。
  • -d<伺服器根目錄> 指定伺服器的根目錄。
  • -D<設定檔案參數> 指定要傳入設定檔的參數。
  • -f<設定檔案> 指定設定檔。
  • -h 顯示協助。
  • -l 顯示伺服器編譯時間所包含的模組。
  • -L 顯示httpd指令的說明。
  • -S 顯示設定檔中的設定。
  • -t 測試組態檔案的文法是否正確。
  • -v 顯示版本資訊。
  • -V 顯示版本資訊以及建立環境。
  • -X 以單一程式的方式來啟動伺服器。

執行個體

檢查設定檔語法錯誤

# httpd -t

httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

Syntax OK

啟動httpd

httpd

httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

顯示編譯模組

# httpd -l

Compiled in modules:

core.c

prefork.c

http_core.c

mod_so.c

顯示設定檔

# httpd -L>1.log|tail -n 20 1.log

Maximum number of children alive at the same time

Allowed in *.conf only outside , or

ServerLimit (prefork.c)

Maximum value of MaxClients for this run of Apache

Allowed in *.conf only outside , or

KeepAliveTimeout (http_core.c)

Keep-Alive timeout duration (sec)

Allowed in *.conf only outside , or

MaxKeepAliveRequests (http_core.c)

Maximum number of Keep-Alive requests per connection, or 0 for infinite

Allowed in *.conf only outside , or

KeepAlive (http_core.c)

Whether persistent connections should be On or Off

Allowed in *.conf only outside , or

LoadModule (mod_so.c)

a module name and the name of a shared object file to load it from

Allowed in *.conf only outside , or

LoadFile (mod_so.c)

shared object file or library to load into the server at runtime

Allowed in *.conf only outside , or

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.