Linux下几种重启Nginx的方式,找出nginx配置文件路径和测试配置文件是否正确

Linux下几种重启Nginx的方式,找出nginx配置文件路径和测试配置文件是否正确

目录在/etc/ngnix/conf.d下
找出nginx配置文件路径和测试配置文件是否正确
# /usr/sbin/nginx -t
几种重启Nginx的方式:
service nginx restart
/etc/init.d/nginx restart
systemctl restart nginx
------------------------
[root@svr-005:~]$ /usr/sbin/nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
[root@svr-005:~]$ service nginx restart
Stoping nginx... nginx is not running.
Starting nginx... /etc/init.d/nginx: line 38: /www/server/nginx/sbin/nginx: No such file or directory
failed

posted @ 2018-12-29 12:21  大自然的流风  阅读(8142)  评论(0编辑  收藏  举报