Last active
August 24, 2018 06:25
-
-
Save tyaakow/1cd0a30095000c11301d3359b13a3537 to your computer and use it in GitHub Desktop.
NGINX virtualhost configuration file for Django & uWSGI setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# the upstream component nginx needs to connect to | |
upstream django { | |
server unix:///tmp/minaguide.sock; | |
} | |
# configuration of the server | |
server { | |
# the port your site will be served on | |
listen 80; | |
# the domain name it will serve for | |
server_name myxydomain.com; # substitute with your domain name | |
charset utf-8; | |
# max upload size | |
client_max_body_size 75M; # adjust to taste | |
# Django media | |
location /media { | |
alias /root/project/minaguide/current/media; # your Django project's media files - amend as required | |
} | |
location /static { | |
alias /root/project/minaguide/current/static; # your Django project's static files - amend as required | |
} | |
# Finally, send all non-media requests to the Django server. | |
location / { | |
uwsgi_pass django; | |
include /root/project/minaguide/current/uwsgi/uwsgi_params; # the uwsgi_params file you installed | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment