Skip to content

Instantly share code, notes, and snippets.

@yusufnb
Created January 16, 2020 02:56
Show Gist options
  • Save yusufnb/ccaf962bafd3f6b98b2e35eb6e6609a1 to your computer and use it in GitHub Desktop.
Save yusufnb/ccaf962bafd3f6b98b2e35eb6e6609a1 to your computer and use it in GitHub Desktop.
worker_processes 1;
events {
worker_connections 1024;
}
http {
send_timeout 1800;
sendfile on;
keepalive_timeout 6500;
server {
listen 80;
server_name localhost;
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
}
# for CRA apps that auto load on change
location /sockjs-node {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
location /api {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
}
location /auth {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment