Reputation: 79
I tried to follow the nginx document here https://uwsgi-docs.readthedocs.io/en/latest/tutorials/Django_and_nginx.html. But stuck at Configure nginx for your site
. I restarted nginx and it said "nginx: [emerg] open() "/home/hanys/oligoweb/uwsgi_params" failed (13: Permission denied) in /etc/nginx/sites-enabled/oligoweb.conf:19
".
My site.ini:
[uwsgi]
chdir = /home/hanys/oligoweb/
module = oligoweb.wsgi
home = /home/hanys/.virtualenv/oligo-env
master = true
processes = 10
socket = /home/hanys/oligoweb/oligoweb.sock
chmod-socket = 666
vacuum = true
daemonize = /home/hanys/uwsgi-emperor.log
uid = www-data
gid = www-data
my site.conf in /etc/nginx/sites-available/
upstream django {
server unix:///home/hanys/oligoweb/oligoweb.sock;
}
server {
listen 80;
server_name IP address here;
charset utf-8;
# max upload size
client_max_body_size 75M;
# Django media and static files
location /static {
alias /home/hanys/oligoweb/static;
}
# Send all non-media requests to the Django server.
location / {
uwsgi_pass django;
include /home/hanys/oligoweb/uwsgi_params;
}
}
uwsgi_params has 664 permission. I tried chmod 777 uwsgi_params but it didnt work. Any help will be appreciated!
Upvotes: 0
Views: 1114
Reputation: 169051
In general, uwsgi_params
is already shipped with your Nginx, so all you need is include uwsgi_params
(so it refers to /etc/nginx/uwsgi_params
or similar).
If that is not the case, you will likely also need to give Nginx enough permissions to read the directory structure that file is in, not just the file itself.
Upvotes: 3