nginx.conf 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. gzip on;
  11. gzip_min_length 1k;
  12. gzip_buffers 16 64K;
  13. gzip_http_version 1.1;
  14. gzip_comp_level 5;
  15. gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml;
  16. gzip_vary on;
  17. gzip_proxied expired no-cache no-store private auth;
  18. gzip_disable "MSIE [1-6]\.";
  19. server {
  20. listen 80;
  21. server_name localhost;
  22. charset utf-8;
  23. location / {
  24. root /usr/share/nginx/html;
  25. try_files $uri $uri/ /index.html;
  26. index index.html index.htm;
  27. }
  28. location /prod-api/ {
  29. proxy_set_header Host $http_host;
  30. proxy_set_header X-Real-IP $remote_addr;
  31. proxy_set_header REMOTE-HOST $remote_addr;
  32. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  33. proxy_pass http://adminNet:5050/;
  34. }
  35. error_page 500 502 503 504 /50x.html;
  36. location = /50x.html {
  37. root html;
  38. }
  39. }
  40. }