nginx.conf 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. #tcp_nopush on;
  11. keepalive_timeout 65;
  12. #gzip on;
  13. #upstream diagnosis {
  14. # server diagnosis:8080;
  15. #}
  16. server {
  17. listen 80;
  18. server_name localhost;
  19. #resolver 114.114.114.114
  20. charset utf-8;
  21. #error_log /usr/share/nginx/logs/error.log;
  22. #access_log /usr/share/nginx/logs/host.access.log;
  23. location /login {
  24. proxy_pass http://diagnosis:8080/;
  25. #proxy_set_header Host $host;
  26. #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  27. }
  28. location /logout {
  29. proxy_pass http://diagnosis:8080/;
  30. #proxy_set_header Host $host;
  31. #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  32. }
  33. # /rest/diagnosis/login --> /login
  34. location /rest/diagnosis/ {
  35. proxy_pass http://diagnosis:8080/;
  36. #proxy_set_header Host $host;
  37. #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  38. }
  39. location / {
  40. root /usr/share/nginx/html;
  41. index index.html;
  42. }
  43. }
  44. }