iipsrv.conf 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. upstream iipsrv {
  2. server localhost:9900;
  3. }
  4. fastcgi_cache_path /data/cache/nginx levels=1:2 keys_zone=iipsrv:256m inactive=1h max_size=1G;
  5. server {
  6. listen 8900;
  7. charset utf-8;
  8. add_header 'Access-Control-Allow-Origin' '*';
  9. location / {
  10. fastcgi_pass iipsrv;
  11. fastcgi_intercept_errors on;
  12. fastcgi_buffering off;
  13. fastcgi_cache iipsrv;
  14. fastcgi_cache_key "$scheme$request_method$host$request_uri";
  15. fastcgi_cache_valid 200 302 60m;
  16. fastcgi_cache_bypass $http_pragma $http_authorization;
  17. include fastcgi_params;
  18. fastcgi_param PATH_INFO $fastcgi_script_name;
  19. fastcgi_param REQUEST_METHOD $request_method;
  20. fastcgi_param QUERY_STRING $query_string;
  21. fastcgi_param CONTENT_TYPE $content_type;
  22. fastcgi_param CONTENT_LENGTH $content_length;
  23. fastcgi_param SERVER_PROTOCOL $server_protocol;
  24. fastcgi_param REQUEST_URI $request_uri;
  25. fastcgi_param HTTPS $https if_not_empty;
  26. # "spoof" external proxy to set correct server URL in info.json.
  27. fastcgi_param HTTP_HOST http://localhost:8900;
  28. }
  29. }