Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- client_max_body_size 20M;
- server_name mydns.com.br xxx.xxx.xxx.xxx;
- access_log /var/log/nginx/novu_access.log;
- error_log /var/log/nginx/novu_error.log;
- location / {
- proxy_pass http://localhost:4200;
- proxy_http_version 1.1;
- if ($request_method = OPTIONS) {
- add_header 'Access-Control-Allow-Origin' '*';
- add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE';
- add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization';
- return 200;
- }
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header Host $host;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- }
- location /api {
- proxy_pass http://localhost:3000/api;
- proxy_http_version 1.1;
- add_header 'Access-Control-Allow-Origin' '*';
- add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE';
- add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization';
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header Host $host;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- }
- location /ws {
- proxy_pass http://localhost:3002/ws;
- proxy_http_version 1.1;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header Host $host;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- }
- location /widget {
- proxy_pass http://localhost:4500/widget;
- proxy_http_version 1.1;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header Host $host;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- }
- location /socket.io/ {
- proxy_pass http://localhost:3002;
- proxy_http_version 1.1;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header Host $host;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- }
- # proxy_headers_hash_max_size 512;
- # proxy_headers_hash_bucket_size 128;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement