首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

nginx起动及检测nginx配置是否正确

2012-12-20 
nginx启动及检测nginx配置是否正确检查配置文件:?/data/app/nginx/sbin/nginx -tnginx: [emerg] invalid n

nginx启动及检测nginx配置是否正确

检查配置文件:

?

/data/app/nginx/sbin/nginx -t

nginx: [emerg] invalid number of arguments in "root" directive in /data/app/nginx/conf/nginx.conf:58

nginx: configuration file /data/app/nginx/conf/nginx.conf test failed

?

上面的结果说明nginx.conf:58行有问题

?

启动nginx

nginx的sbin目录下 ?运行./nginx?

ps -ef|grep nginx后显示

?

root ? ? 28775 ? ? 1 ?0 18:24 ? ? ? ? ?00:00:00 nginx: master process ./nginx

nobody ? 28776 28775 ?0 18:24 ? ? ? ? ?00:00:00 nginx: worker process

nobody ? 28777 28775 ?0 18:24 ? ? ? ? ?00:00:00 nginx: worker process

nobody ? 28778 28775 ?0 18:24 ? ? ? ? ?00:00:00 nginx: worker process

nobody ? 28779 28775 ?0 18:24 ? ? ? ? ?00:00:00 nginx: worker process

nobody ? 28780 28775 ?0 18:24 ? ? ? ? ?00:00:00 nginx: worker process

nobody ? 28781 28775 ?0 18:24 ? ? ? ? ?00:00:00 nginx: worker process

nobody ? 28782 28775 ?0 18:24 ? ? ? ? ?00:00:00 nginx: worker process

nobody ? 28783 28775 ?0 18:24 ? ? ? ? ?00:00:00 nginx: worker process

?

说明正常启动。

?

重启命令:

./nginx -s reload

热点排行