我正在尝试在nginx和uwsgi中使用unix socket,但它对我不起作用,但没有unix socket工作。
document.body.appendChild(_this.hiddenFileInput);
nginx.conf
uwsgi --socket test_django_uwsgi.sock --protocol=http --virtualenv /home/ubuntu/myenv27/ --wsgi-file wsgi.py
uwsgi.log
server {
# the port your site will be served on
listen 80;
# the domain name it will serve for
server_name www.example.com; # substitute your machine's IP address or FQDN
charset utf-8;
access_log /home/ubuntu/test_django/nginx-access.log;
error_log /home/ubuntu/test_django/nginx-error.log info;
# max upload size
client_max_body_size 75M; # adjust to taste
# Django media
location /media {
alias /home/ubuntu/test_django/static/media/; # your Django project's media files - amend as required
}
location /static {
alias /home/ubuntu/test_django/static/; # your Django project's static files - amend as required
}
# Finally, send all non-media requests to the Django server.
location / {
#uwsgi_pass 127.0.0.1:8000;
uwsgi_pass unix:///home/ubuntu/test_django/test_django/test_django_uwsgi.sock;
include /home/ubuntu/test_django/uwsgi_params; # the uwsgi_params file you installed
}
}
当我试图访问www.example.com:8000时,我的网站无法打开。