检查配置是否正常,如果显示:
the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
configuration file /usr/local/nginx/conf/nginx.conf test is successful
则正常,否则按错误提示修改配置。
再执行
1 kill -HUP `cat /usr/local/nginx/logs/nginx.pid`
2 /usr/local/nginx/sbin/nginx