Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- upstream school {
- server web:8000;
- }
- server {
- listen 80;
- location / {
- root /app/dist;
- #index index.html index.htm;
- try_files $uri $uri/ /index.html;
- }
- location /api/ {
- proxy_pass http://school;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header Host $host;
- proxy_redirect off;
- }
- location /ws/ {
- proxy_pass http://0.0.0.0:8001;;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- proxy_redirect off;
- 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-Host $server_name;
- }
- location /static/ {
- root /home/app/web;
- }
- location /media/ {
- root /home/app/web;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement