cash-stacks/devops/nginx/nginx-static.conf

43 lines
947 B
Plaintext
Raw Normal View History

2021-04-15 02:36:40 +00:00
worker_processes 1;
events { worker_connections 1024; }
http {
# upstream client {
# server frontend:3000;
# }
server {
listen 80;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
client_max_body_size 10M;
index index.html;
root /var/www/html;
location / {
try_files $uri $uri/ /index.html =404;
}
location /api {
proxy_pass http://server:8000;
rewrite ^/api(.*)$ $1 break;
}
location /cable {
proxy_pass http://server:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# rewrite ^/cable(.*)$ $1 break;
}
location /socksjs-node {
proxy_pass http://server:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# rewrite ^/cable(.*)$ $1 break;
}
}
}