Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. user www-data;
  2. #set worker processes to cpu processes
  3. worker_processes 4;
  4.  
  5. error_log /var/log/nginx/error.log;
  6. pid /run/nginx.pid;
  7. events {
  8. worker_connections 1024;
  9. }
  10.  
  11.  
  12. http {
  13. client_max_body_size 200m;
  14. include /etc/nginx/mime.types;
  15. default_type application/octet-stream;
  16. access_log /var/log/nginx/access.log;
  17. sendfile on;
  18. keepalive_timeout 3;
  19. types_hash_max_size 2048;
  20. gzip on;
  21. gzip_disable msie6;
  22. gzip_static on;
  23. gzip_types text/plain text/css application/x-javascript text/xml application/xml+rss text/javascript;
  24. gzip_vary on;
  25. fastcgi_read_timeout 2m;
  26.  
  27. include global/caching.conf;
  28. include /etc/nginx/enabled-sites/*;
  29. upstream php {
  30. server 127.0.0.1:9000;
  31. }
  32. #fastcgi caching header
  33. add_header mcapp-fastcgi-cache $upstream_cache_status;
  34. }
  35.  
  36. server {
  37. server_name www.examplesite.com;
  38. rewrite ^ $scheme://examplesite.com$request_uri permanent;
  39. }
  40.  
  41. server {
  42. #pagespeed directives
  43. pagespeed On;
  44. pagespeed FileCachePath /var/cache/nginx-pagespeed;
  45. location ~ ".pagespeed.([a-z].)?[a-z]{2}.[^.]{10}.[^.]+" {
  46. add_header "" "";
  47. }
  48. location ~ "^/ngx_pagespeed_static/" { }
  49. location ~ "^/ngx_pagespeed_beacon$" { }
  50. #pagespeed directives end
  51.  
  52. server_name examplesite.com;
  53. root /path/to/examplesite;
  54.  
  55. # wordpress config
  56. include global/restrictions.conf;
  57. include global/wordpress.conf;
  58. }
  59.  
  60. Enable compression for the following resources to reduce their transfer size by 355.5KiB (69% reduction).
  61. Compressing http://examplesite.com/wp-includes/js/jquery/jquery.js,qver=1.10.2.pagespeed.jm.iCH2ukpEYb.js could save 58.8KiB (64% reduction).
  62. Compressing http://examplesite.com/wp-content/themes/Avada/framework/plugins/revslider/rs-plugin/js/jquery.themepunch.revolution.min.js?ver=3.6.1 could save 43.9KiB (80% reduction).
  63.  
  64. gzip_types text/plain text/css application/x-javascript text/xml application/xml+rss text/javascript;
  65.  
  66. gzip_types text/plain text/css application/javascript text/xml application/xml+rss;
  67.  
  68. gzip_types text/plain text/css application/javascript text/xml application/xml+rss;
  69.  
  70. application/x-javascript js;
  71.  
  72. application/javascript js;
  73.  
  74. service nginx reload
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement