nginx.conf 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. worker_processes 1;
  2. events {
  3. worker_connections 1024;
  4. }
  5. http {
  6. include mime.types;
  7. default_type application/octet-stream;
  8. #获取真实ip
  9. proxy_set_header Host $host;
  10. proxy_set_header X-Real-IP $remote_addr;
  11. proxy_set_header X-Real-Port $remote_port;
  12. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  13. client_max_body_size 20m;
  14. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  15. '$status $body_bytes_sent "$http_referer" '
  16. '"$http_user_agent" "$http_x_forwarded_for"';
  17. sendfile on;
  18. keepalive_timeout 65;
  19. map $http_upgrade $connection_upgrade {
  20. default upgrade;
  21. '' close;
  22. }
  23. server {
  24. listen 4090;
  25. server_name localhost;
  26. root /home/intergration-platform/dist;
  27. location / {
  28. try_files $uri $uri/ @router;
  29. index index.html index.htm;
  30. }
  31. location @router {
  32. rewrite ^.*$ /index.html last;
  33. }
  34. location ^~ /emr {
  35. proxy_pass http://130.150.161.69:8001/emr;
  36. }
  37. location ^~ /bdp/dataservice/api {
  38. proxy_pass http://172.16.32.183:8888/bdp/dataservice/api;
  39. }
  40. }
  41. }