nginx.conf 983 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. worker_processes 1;
  2. events {
  3. worker_connections 1024;
  4. }
  5. http {
  6. include mime.types;
  7. default_type application/octet-stream;
  8. sendfile on;
  9. keepalive_timeout 65;
  10. server {
  11. listen 8002;
  12. server_name localhost;
  13. charset utf-8;
  14. location / {
  15. root D:/warewms/code/dist;
  16. try_files $uri $uri/ /index.html;
  17. index index.html index.htm;
  18. }
  19. location /prod-api/ {
  20. proxy_set_header Host $http_host;
  21. proxy_set_header X-Real-IP $remote_addr;
  22. proxy_set_header REMOTE-HOST $remote_addr;
  23. proxy_set_header X-Forwarded-For
  24. $proxy_add_x_forwarded_for;
  25. proxy_pass http://localhost:8008/;
  26. }
  27. location /stage-api/ {
  28. proxy_set_header Host $http_host;
  29. proxy_set_header X-Real-IP $remote_addr;
  30. proxy_set_header REMOTE-HOST $remote_addr;
  31. proxy_set_header X-Forwarded-For
  32. $proxy_add_x_forwarded_for;
  33. proxy_pass http://localhost:8008/;
  34. }
  35. error_page 500 502 503 504 /50x.html;
  36. location = /50x.html {
  37. root html;
  38. }
  39. }
  40. }