Linux_246_Nginx命令行參數(shù)解析

1、nginx啟停的指令,-s參數(shù)指的是給nginx進(jìn)程發(fā)送某種信號
nginx # 初次啟動,直接輸入nginx,如啟動后再執(zhí)行該命令,就會提示端口沖突(停止nginx再啟動)
nginx -s stop # 停止nginx進(jìn)程
nginx -s reload # 平滑重啟,利用reload可以在不重啟nginx進(jìn)程的情況下,重新讀取配置文件

2、查看nginx的幫助信息
Options:
-?,-h : this help # 輸出nginx的幫助信息
-v : show version and exit # 列出nginx的版本號
-V : show version and configure options then exit # 列出nginx版本和編譯參數(shù)信息
-t : test configuration and exit # 檢查nginx的配置文件,語法是否正確
-T : test configuration, dump it and exit # 同是檢查配置,然后輸出配置信息

# 在檢測配置文件期間屏蔽非錯誤信息
-q : suppress non-error messages during configuration testing
# 給nginx主進(jìn)程發(fā)送一個信號,分別是stop停止運(yùn)行,quit優(yōu)雅停止,reload重讀配置文件,reopen重新記錄nginx日志
-s signal : send signal to a master process: stop, quit, reopen, reload
# 設(shè)置nginx目錄前綴
-p prefix : set prefix path (default: /opt/tngx232/)
# nginx -c /opt/mynginx.conf 指定配置文件去啟動
-c filename : set configuration file (default: conf/nginx.conf)
# 覆蓋設(shè)置一些默認(rèn)參數(shù)
-g directives : set global directives out of configuration file

-m : show all modules and exit # 列出nginx所有支持的模塊并退出
-l : show all directives and exit # 列出nginx所有目錄的相關(guān)信息

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容