Created
February 2, 2023 06:49
-
-
Save haribinp/143bfc2ce84728596743f45c29c63795 to your computer and use it in GitHub Desktop.
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
| upstream django_app { | |
| server 127.0.0.1:8000; | |
| } | |
| server { | |
| listen 80; | |
| server_name demo.gatos.io; | |
| access_log /var/log/nginx/app.log; | |
| error_log /var/log/nginx/app.error.log; | |
| location /static { | |
| autoindex on; | |
| alias /home/platzi/platzi/staticfiles/; | |
| } | |
| location /media { | |
| autoindex on; | |
| alias /home/platzi/platzi/media/; | |
| } | |
| location / { | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header Host $http_host; | |
| proxy_redirect off; | |
| proxy_pass http://django_app; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment