1
0

nginx.conf 1009 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. client_max_body_size 500M;
  11. server {
  12. listen 80;
  13. server_name localhost;
  14. location / {
  15. root /home/siwei/projects/siwei-ui;
  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 $proxy_add_x_forwarded_for;
  24. proxy_pass http://127.0.0.1:8080/;
  25. }
  26. # 避免actuator暴露
  27. if ($request_uri ~ "/actuator") {
  28. return 403;
  29. }
  30. error_page 500 502 503 504 /50x.html;
  31. location = /50x.html {
  32. root html;
  33. }
  34. }
  35. }