poechant@ubuntu:sudo ./sbin/nginx
poechant@ubuntu:sudo ./sbin/nginx -s stop
poechant@ubuntu:sudo ./sbin/nginx -s quit
-s
都是採用向 nginx 傳送訊號的方式。
poechant@ubuntu:sudo ./sbin/nginx -s reload
上述是採用向 nginx 傳送訊號的方式,或者使用:
poechant@ubuntu:service nginx reload
poechant@ubuntu:sudo ./sbin/nginx -c /usr/local/nginx/conf/nginx.conf
-c
表示configuration
,指定配置檔案。
有兩種可以檢視 nginx 的版本資訊的引數。第一種如下:
poechant@ubuntu:/usr/local/nginx$ ./sbin/nginx -v
nginx: nginx version: nginx/1.0.0
另一種顯示的是詳細的版本資訊:
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed如果出現如上的提示資訊,表示沒有訪問錯誤日誌檔案和程序,可以sudo
(super user do
)一下:
poerchant@ubuntu:/usr/local/nginx$ sudo ./sbin/nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
如果顯示如上,則表示配置檔案正確。否則,會有相關提示。
poechant@ubuntu:/user/local/nginx$ ./sbin/nginx -h
或者:
poechant@ubuntu:/user/local/nginx$ ./sbin/nginx -?
nginx常用命令
root ta30 53 nginx pwd usr local nginx root ta30 53 nginx sbin nginx root ta30 53 nginx sbin nginx s stop root ta30 53 nginx sbin nginx s quit s都是採用向 ...
Nginx常用命令
usr local nginx sbin nginx t或 usr local nginx sbin t c usr local nginx conf nginx.conf檢測結果會提示配置檔案 出現了錯誤,出現success說明檔案正確。顯示版本資訊可以用 usr local nginx sbin...
nginx常用命令
在nginx.exe目錄,開啟命令列工具,用命令 啟動 關閉 重啟nginx cd 改變工作目錄 start nginx 啟動nginx nginx s stop 強制關閉 nginx s quit 安全關閉 nginx s reload 改變配置檔案的時候,重啟nginx工作程序,來時配置檔案生效...