Created
February 14, 2022 11:34
-
-
Save mebaysan/7e438afc68d95cc9c32c8c1bb4688dbd to your computer and use it in GitHub Desktop.
An example Nginx conf file for a Django app
This file contains hidden or 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
server { | |
listen 80; | |
server_name <DOMAIN> <AND / OR> <SERVER IP>; | |
location = /favicon.ico { access_log off; log_not_found off; } | |
location /static/ { | |
root /home/serverUsername/projectfolder/; | |
} | |
location /media/ { | |
root /home/serverUsername/projectfolder/; | |
} | |
location / { | |
include proxy_params; | |
proxy_pass http://unix:/home/serverUsername/projectfolder/project.sock; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment