“configuration file /etc/nginx/nginx.conf test failed”: How do I know why this happened?

前端 未结 4 2125

I\'m an nginx noob trying out this this tutorial on nginx 1.1.19 on ubuntu 12.04. I have this nginx config file.

When I run this command the test fails:

         


        
4条回答
  •  青春惊慌失措
    2021-01-31 01:40

    If you want to check syntax error for any nginx files, you can use the -c option.

    [root@server ~]# sudo nginx -t -c /etc/nginx/my-server.conf
    nginx: the configuration file /etc/nginx/my-server.conf syntax is ok
    nginx: configuration file /etc/nginx/my-server.conf test is successful
    [root@server ~]# 
    

提交回复
热议问题