Last active
January 15, 2021 03:02
-
-
Save Soyuzbek/811288d03aa78133e13bdc99f9a9c4a7 to your computer and use it in GitHub Desktop.
Configuration file for django api & vue spa server
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 your.ip.address.or.domain.name; | |
root /var/www/project_name/; | |
location / { | |
try_files /static/index.html =404; | |
} | |
location = /favicon.ico { access_log off; log_not_found off; } | |
location /static/ { | |
alias /var/www/project_name/static/; | |
} | |
location /api/ { | |
include proxy_params; | |
proxy_pass http://unix:/run/gunicorn.sock; | |
} | |
location /admin/ { | |
include proxy_params; | |
proxy_pass http://unix:/run/gunicorn.sock; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment