nginx.conf 896 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #user nobody;
  2. worker_processes 1;
  3. events {
  4. worker_connections 1024;
  5. }
  6. http {
  7. include mime.types;
  8. default_type application/octet-stream;
  9. sendfile on;
  10. keepalive_timeout 65;
  11. #gzip on;
  12. server {
  13. listen 80;
  14. server_name localhost;
  15. location /api/ {
  16. proxy_set_header Host $http_host;
  17. proxy_set_header X-Real-IP $remote_addr;
  18. proxy_set_header REMOTE-HOST $remote_addr;
  19. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  20. proxy_pass http://172.28.1.100:8080/api/;
  21. }
  22. location / {
  23. root /etc/nginx/html/dist;
  24. try_files $uri $uri/ /index.html;
  25. index index.html index.htm;
  26. }
  27. error_page 500 502 503 504 /50x.html;
  28. location = /50x.html {
  29. root html;
  30. }
  31. }
  32. }