default.conf 642 B

12345678910111213141516171819202122232425262728
  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. # location /api {
  19. proxy_pass http://backend:8888/api;
  20. }
  21. # include /etc/nginx/extra-conf.d/*.conf;
  22. }