Answer the question
In order to leave comments, you need to log in
Why is nginx not working? Or why does sudo /etc/init.d/nginx restart give [fail]?
Hello.
I'm trying to deploy a django project on vps with a bunch of nginx + uwsgi + django.
Actually nothing comes out.
I do everything according to the tutorial
Nginx is installed ( it sudo apt-get install nginx
gives the command: nginx is already the newest version.
It sudo /etc/init.d/nginx start
does not display anything at all on the command (maybe it should be?).
It gives out the commands But sudo /etc/init.d/nginx reload
it sudo /etc/init.d/nginx restart
gives out [fail]
for the testsudo nginx -t
nginx: [crit] pread() "/etc/nginx/sites-enabled/mysite" failed (21: Is a directory)
nginx: configuration file /etc/nginx/nginx.conf test failed
Answer the question
In order to leave comments, you need to log in
/etc/nginx/sites-enabled/ should contain config files, and you have some directory created there /etc/nginx/sites-enabled/mysite.
Delete the directory and see what new errors come up.
You can't put files in etc/nginx/sites-enabled (at least as long as you have include /etc/nginx/sites-enabled/* written in nginx.conf, and not something like include /etc/ nginx/sites-enabled/*.conf).
mysite is your folder.
sudo nginx -t should test all files and return errors and warnings locations
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question