Skip to content

Instantly share code, notes, and snippets.

@tyaakow tyaakow/myxydomain.conf
Last active Aug 24, 2018

Embed
What would you like to do?
NGINX virtualhost configuration file for Django & uWSGI setup
# 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
You can’t perform that action at this time.