第一步 先运行命令关闭nginx sudo kill `cat /usr/local/nginx/logs/nginx.pid` 第二步 vi /etc/init.d/nginx 输入以下内容 代码如下: #!/bin/sh # # nginx – this script starts and stops the nginx daemin # # chkconfig: – 85 15 # description: Nginx is an HTTP(S) server, HTTP(S) reverse \ # proxy and IMAP/POP3 proxy server # process