Created
March 17, 2018 23:09
-
-
Save danielcodes/8e6ee3eea155d9e6bcd191e8f7bbab6d to your computer and use it in GitHub Desktop.
Nginx config file for Pollster
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
upstream app_server { | |
server unix:/home/daniel/run/gunicorn.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
root /home/daniel/voting_app/client/build; | |
server_name <your_server_ip>; | |
index index.html index.htm; | |
keepalive_timeout 5; | |
client_max_body_size 4G; | |
access_log /home/daniel/logs/nginx-access.log; | |
error_log /home/daniel/logs/nginx-error.log; | |
location / { | |
try_files $uri /index.html; | |
} | |
location /api { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_pass http://app_server; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment