Skip to content

Instantly share code, notes, and snippets.

@edrdesigner
Created June 23, 2019 19:17
Show Gist options
  • Save edrdesigner/0d1c4a83ac2321f408d0917dc93121ba to your computer and use it in GitHub Desktop.
Save edrdesigner/0d1c4a83ac2321f408d0917dc93121ba to your computer and use it in GitHub Desktop.
Nginx config para react deploy
## cmd vim /etc/nginx/sites-available/default
upstream node {
server 127.0.0.1:8080;
keepalive 64;
}
server {
listen 80;
# server_name domain.com;
root /home/deploy/goreact-deploy;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
proxy_max_temp_file_size 0;
proxy_pass http://node/;
proxy_redirect off;
proxy_read_timeout 240s;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment