Advertisement
Guest User

Nginx Configuration

a guest
Oct 7th, 2013
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. worker_processes 1;
  2. daemon off;
  3. master_process on;
  4.  
  5. error_log logs/error.log debug;
  6.  
  7. events {
  8. worker_connections 1024;
  9. }
  10.  
  11. http {
  12. include mime.types;
  13. default_type application/octet-stream;
  14. sendfile on;
  15. keepalive_timeout 65;
  16. ssi on;
  17.  
  18. gzip on;
  19. gzip_types application/javascript;
  20. pagespeed MessageBufferSize 1000000;
  21. pagespeed FileCachePath /opt/ngx_pagespeed;
  22. pagespeed RateLimitBackgroundFetches on;
  23.  
  24. server {
  25. pagespeed on;
  26.  
  27. location /mod_pagespeed_example {
  28. add_header Cache-Control public;
  29. add_header Vary Accept-Encoding;
  30. }
  31. location /pagespeed_console {
  32. allow all;
  33. }
  34.  
  35. location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" { add_header "" ""; }
  36. location ~ "^/ngx_pagespeed_static/" { }
  37. location ~ "^/ngx_pagespeed_beacon$" { }
  38. location /ngx_pagespeed_statistics { allow all; }
  39. location /ngx_pagespeed_message { allow all; }
  40.  
  41. pagespeed FileCacheSizeKb 10000;
  42. pagespeed InstallCrashHandler on;
  43.  
  44. listen 8020;
  45. server_name localhost;
  46. add_header from-server 1;
  47. root html/banner;
  48. pagespeed on;
  49.  
  50. location /mod_pagespeed_test {
  51. add_header from-location-mps-test 1;
  52. autoindex on;
  53. }
  54.  
  55. location / {
  56. autoindex on;
  57. add_header from-root-location 1;
  58. }
  59.  
  60. }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement