default.conf 618 B

123456789101112131415161718192021222324252627
  1. server {
  2. listen 80;
  3. # server_name xx.com
  4. location / {
  5. proxy_set_header X-Forwarded-Host $host;
  6. proxy_set_header X-Forwarded-Server $host;
  7. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  8. proxy_pass http://frontend:3000;
  9. proxy_redirect off;
  10. proxy_http_version 1.1;
  11. proxy_set_header Upgrade $http_upgrade;
  12. proxy_set_header Connection "upgrade";
  13. # root /usr/share/nginx/html;
  14. # index index.html index.htm;
  15. # try_files $uri /index.html =404;
  16. }
  17. location /api {
  18. proxy_pass http://backend:8888/api;
  19. }
  20. # include /etc/nginx/extra-conf.d/*.conf;
  21. }