Advertisement
Guest User

Untitled

a guest
Sep 12th, 2014
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.84 KB | None | 0 0
  1. # BEGIN W3TC Minify cache
  2. location ~ /wp-content/cache/minify.*\.js$ {
  3. types {}
  4. default_type application/x-javascript;
  5. expires modified 31536000s;
  6. add_header X-Powered-By "W3 Total Cache/0.9.4";
  7. add_header Vary "Accept-Encoding";
  8. add_header Pragma "public";
  9. add_header Cache-Control "max-age=31536000, public";
  10. }
  11. location ~ /wp-content/cache/minify.*\.css$ {
  12. types {}
  13. default_type text/css;
  14. expires modified 31536000s;
  15. add_header X-Powered-By "W3 Total Cache/0.9.4";
  16. add_header Vary "Accept-Encoding";
  17. add_header Pragma "public";
  18. add_header Cache-Control "max-age=31536000, public";
  19. }
  20. location ~ /wp-content/cache/minify.*js\.gzip$ {
  21. gzip off;
  22. types {}
  23. default_type application/x-javascript;
  24. expires modified 31536000s;
  25. add_header X-Powered-By "W3 Total Cache/0.9.4";
  26. add_header Vary "Accept-Encoding";
  27. add_header Pragma "public";
  28. add_header Cache-Control "max-age=31536000, public";
  29. add_header Content-Encoding gzip;
  30. }
  31. location ~ /wp-content/cache/minify.*css\.gzip$ {
  32. gzip off;
  33. types {}
  34. default_type text/css;
  35. expires modified 31536000s;
  36. add_header X-Powered-By "W3 Total Cache/0.9.4";
  37. add_header Vary "Accept-Encoding";
  38. add_header Pragma "public";
  39. add_header Cache-Control "max-age=31536000, public";
  40. add_header Content-Encoding gzip;
  41. }
  42. # END W3TC Minify cache
  43. # BEGIN W3TC Page Cache cache
  44. location ~ /wp-content/cache/page_enhanced.*html$ {
  45. expires modified 3600s;
  46. add_header X-Powered-By "W3 Total Cache/0.9.4";
  47. add_header Vary "Accept-Encoding, Cookie";
  48. add_header Pragma "public";
  49. add_header Cache-Control "max-age=3600, public";
  50. }
  51. location ~ /wp-content/cache/page_enhanced.*gzip$ {
  52. gzip off;
  53. types {}
  54. default_type text/html;
  55. expires modified 3600s;
  56. add_header X-Powered-By "W3 Total Cache/0.9.4";
  57. add_header Vary "Accept-Encoding, Cookie";
  58. add_header Pragma "public";
  59. add_header Cache-Control "max-age=3600, public";
  60. add_header Content-Encoding gzip;
  61. }
  62. # END W3TC Page Cache cache
  63. # BEGIN W3TC Browser Cache
  64. gzip on;
  65. gzip_types text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon;
  66. location ~ \.(css|htc|less|js|js2|js3|js4)$ {
  67. expires 31536000s;
  68. add_header Pragma "public";
  69. add_header Cache-Control "max-age=31536000, public";
  70. add_header X-Powered-By "W3 Total Cache/0.9.4";
  71. }
  72. location ~ \.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml)$ {
  73. expires 3600s;
  74. add_header Pragma "public";
  75. add_header Cache-Control "max-age=3600, public";
  76. add_header X-Powered-By "W3 Total Cache/0.9.4";
  77. }
  78. location ~ \.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|woff|xla|xls|xlsx|xlt|xlw|zip)$ {
  79. expires 31536000s;
  80. add_header Pragma "public";
  81. add_header Cache-Control "max-age=31536000, public";
  82. add_header X-Powered-By "W3 Total Cache/0.9.4";
  83. }
  84. # END W3TC Browser Cache
  85. # BEGIN W3TC Minify core
  86. rewrite ^/wp-content/cache/minify.*/w3tc_rewrite_test$ /wp-content/plugins/w3-total-cache/pub/minify.php?w3tc_rewrite_test=1 last;
  87. set $w3tc_enc "";
  88. if ($http_accept_encoding ~ gzip) {
  89. set $w3tc_enc .gzip;
  90. }
  91. if (-f $request_filename$w3tc_enc) {
  92. rewrite (.*) $1$w3tc_enc break;
  93. }
  94. rewrite ^/wp-content/cache/minify/(.+/[X]+\.css)$ /wp-content/plugins/w3-total-cache/pub/minify.php?test_file=$1 last;
  95. rewrite ^/wp-content/cache/minify/(.+\.(css|js))$ /wp-content/plugins/w3-total-cache/pub/minify.php?file=$1 last;
  96. # END W3TC Minify core
  97. # BEGIN W3TC Page Cache core
  98. set $w3tc_rewrite 1;
  99. if ($request_method = POST) {
  100. set $w3tc_rewrite 0;
  101. }
  102. if ($query_string != "") {
  103. set $w3tc_rewrite 0;
  104. }
  105. if ($request_uri !~ \/$) {
  106. set $w3tc_rewrite 0;
  107. }
  108. if ($http_cookie ~* "(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle)") {
  109. set $w3tc_rewrite 0;
  110. }
  111. if ($http_cookie ~* "(w3tc_preview)") {
  112. set $w3tc_rewrite _preview;
  113. }
  114. set $w3tc_enc "";
  115. if ($http_accept_encoding ~ gzip) {
  116. set $w3tc_enc _gzip;
  117. }
  118. set $w3tc_ext "";
  119. if (-f "$document_root/wp-content/cache/page_enhanced/$http_host/$request_uri/_index$w3tc_rewrite.html$w3tc_enc") {
  120. set $w3tc_ext .html;
  121. }
  122. if (-f "$document_root/wp-content/cache/page_enhanced/$http_host/$request_uri/_index$w3tc_rewrite.xml$w3tc_enc") {
  123. set $w3tc_ext .xml;
  124. }
  125. if ($w3tc_ext = "") {
  126. set $w3tc_rewrite 0;
  127. }
  128. if ($w3tc_rewrite = 1) {
  129. rewrite .* "/wp-content/cache/page_enhanced/$http_host/$request_uri/_index$w3tc_rewrite$w3tc_ext$w3tc_enc" last;
  130. }
  131. # END W3TC Page Cache core
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement