Jakub Man | d521d6b | 2021-02-09 22:07:27 +0100 | [diff] [blame^] | 1 | server { |
| 2 | listen 80; |
| 3 | listen [::]:80; |
| 4 | |
| 5 | root /var/www/html; |
| 6 | |
| 7 | location /socket.io { |
| 8 | include proxy_params; |
| 9 | proxy_http_version 1.1; |
| 10 | proxy_buffering off; |
| 11 | proxy_set_header Upgrade $http_upgrade; |
| 12 | proxy_set_header Connection "Upgrade"; |
| 13 | proxy_pass http://127.0.0.1:5555/socket.io; |
| 14 | } |
| 15 | |
| 16 | location /libapi { |
| 17 | include proxy_params; |
| 18 | proxy_pass http://127.0.0.1:5555/; |
| 19 | } |
| 20 | |
| 21 | location ~* .(js|css|ttf|ttc|otf|eot|woff|woff2)$ { |
| 22 | add_header access-control-allow-origin "*"; |
| 23 | expires max; |
| 24 | } |
| 25 | |
| 26 | location / { |
| 27 | try_files $uri$args $uri$args/ $uri $uri/ /index.html; |
| 28 | } |
| 29 | } |