“configuration file /etc/nginx/nginx.conf test fai

2020-05-18 04:50发布

问题:

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:

$ sudo service nginx restart
Restarting nginx: nginx: [crit] pread() "/etc/nginx/sites-enabled/csv" failed (21: Is a directory)
nginx: configuration file /etc/nginx/nginx.conf test failed

How do I know why the nginx.conf test failed?

回答1:

sudo nginx -t should test all files and return errors and warnings locations



标签: nginx