nginx常用命令

來源:互聯網
上載者:User

nginx常用命令 1、查看nginx進程 1ps -ef|grep nginx說明:nginx的進程由主進程和背景工作處理序組成。  www.2cto.com  2、啟動nginx 1nginx啟動結果顯示nginx的主線程和背景工作執行緒,背景工作執行緒的數量跟nginx.conf中的配置參數worker_processes有關。  3、平滑啟動nginx 1kill -HUP `cat /var/run/nginx.pid` 2或者3nginx -s reload其中進程檔案路徑在設定檔nginx.conf中可以找到。 平滑啟動的意思是在不停止nginx的情況下,重啟nginx,重新載入設定檔,啟動新的背景工作執行緒,完美停止舊的背景工作執行緒。  4、完美停止nginx 1kill -QUIT `cat /var/run/nginx.pid` 5、快速停止nginx 1kill -TERM `cat /var/run/nginx.pid`2或者3kill -INT `cat /var/run/nginx.pid` 6、完美停止背景工作處理序(主要用於平滑升級) 1kill -WINCH `cat /var/run/nginx.pid` 7、強制停止nginx 1pkill -9 nginx 8、檢查對nginx.conf檔案的修改是否正確 1nginx -t -c /etc/nginx/nginx.conf 或者 nginx -t 9、停止nginx的命令 1nginx -s stop10、查看nginx的版本資訊 1nginx -v 11、查看完整的nginx的配置資訊  1nginx -V 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.