R
R
Rustem Vorozheikin2015-05-14 19:38:04
Django
Rustem Vorozheikin, 2015-05-14 19:38:04

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 nginxgives the command: nginx is already the newest version.
It sudo /etc/init.d/nginx startdoes not display anything at all on the command (maybe it should be?).
It gives out the commands But sudo /etc/init.d/nginx reloadit sudo /etc/init.d/nginx restartgives 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

Actually, I can't find the error.
The main problem here is that I encountered nginx and uwsgi yesterday, in fact, I can not understand some obvious points (stupid).
I would be grateful for advice/recommendations/help. )

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Igor, 2015-05-14
@merryjane

/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.

V
Vlad Zhivotnev, 2015-05-15
@inkvizitor68sl

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.

A
avstepanov, 2016-08-29
@avstepanov

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

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question