改變nginx配置想讓它生效而不中止服務,以下兩種方式均可以:1)nginx
檢查nginx配置:ast
nginx -t; 配置
配置重載:語法
nginx -s reload2)process
檢查nginx配置:錯誤
nginx -t;
kill -HUP <nginx_master_process_pid>nginx -t 檢查nginx配置的語法,操做前都要檢查一下,很重要,發現錯誤可及時修正.