ngx_prod.conf 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. server {
  2. listen 80;
  3. client_max_body_size 4G;
  4. server_name ostateadmin.hiwavo.com;
  5. #keepalive_timeout 5;
  6. access_log /home/www/fohow/statement_admin/log/ngx_access.log main;
  7. error_log /home/www/fohow/statement_admin/log/ngx_error.log;
  8. error_page 500 502 503 504 /50x.html;
  9. location = /500.html {
  10. root /home/www/fohow/statement_admin/public;
  11. }
  12. error_page 404 /404.html;
  13. location = /404.html {
  14. root /home/www/fohow/statement_admin/public;
  15. }
  16. location /js {
  17. root /home/www/fohow/statement_admin/public;
  18. }
  19. location /css {
  20. root /home/www/fohow/statement_admin/public;
  21. }
  22. location /img {
  23. root /home/www/fohow/statement_admin/public;
  24. }
  25. root /home/www/fohow/statement_admin/public;
  26. location / {
  27. #allow 113.106.106.3;
  28. #allow 113.106.106.2;
  29. #deny all;
  30. proxy_redirect off;
  31. proxy_set_header Host $host;
  32. proxy_set_header X-Real-IP $remote_addr;
  33. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  34. proxy_pass http://127.0.0.1:5959;
  35. }
  36. # static resource routing - both assets folder and favicon.ico
  37. location ~* ^/a2ssets/|favicon.ico {
  38. # Per RFC2616 - 1 year maximum expiry
  39. # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
  40. expires 1y;
  41. add_header Cache-Control public;
  42. # Some browsers still send conditional-GET requests if there's a
  43. # Last-Modified header or an ETag header even if they haven't
  44. # reached the expiry date sent in the Expires header.
  45. add_header Last-Modified "";
  46. add_header ETag "";
  47. break;
  48. }
  49. }