7、输入 cd /alidata/server/nginx-1.4.4/sbin,然后输入 ./nginx -t ,如果控制台显示下面两行,则表示配置成功了,否则请根据提示继续检查配置文件。
nginx: the configuration file /alidata/server/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /alidata/server/nginx/conf/nginx.conf test is successful
8、配置成功之后, 就 需要重启 nginx 服务器。 在sbin目录下输入命令:./nginx -s reload, 然后整个过程就完成了。
另外, 总结一下nginx 的几个常用命令:
启动
./nginx
重启
./nginx -s reload
关闭
ps -ef | grep nginx # 查询nginx主进程号
从容停止 kill -QUIT 主进程号
快速停止 kill -TERM 主进程号
强制停止 kill -9 nginx
若nginx.conf配置了pid文件路径,如果没有,则在logs目录下
kill -信号类型 '/usr/local/nginx/logs/nginx.pid'
判断配置文件是否正确
./nginx -t
IIS7站长之家提示您:这篇文章你看完了!