| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- server {
- listen 80;
- server_name localhost;
- root /usr/share/nginx/html;
- index index.html;
- location / {
- try_files $uri $uri/ /index.html;
- }
- location /api {
- proxy_pass http://maxkb-web:8080;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- }
- location /admin {
- rewrite ^/admin(/.*)$ $1 break;
- proxy_pass http://maxkb-web:8080;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- }
- location /chat {
- alias /usr/share/nginx/html/chat;
- try_files $uri $uri/ /chat/index.html;
- }
- location /chat/api {
- proxy_pass http://maxkb-web:8080;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- }
- location /ws {
- proxy_pass http://maxkb-web:8080;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- }
- gzip on;
- gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
- }
|