91 lines
4.4 KiB
Nginx Configuration File
91 lines
4.4 KiB
Nginx Configuration File
# BEGIN W3TC Minify cache
|
|
location ~ /wp-content/cache/minify/.*\.js$ {
|
|
types {}
|
|
default_type application/x-javascript;
|
|
expires modified 31536000s;
|
|
add_header X-Powered-By "W3 Total Cache/0.9.7";
|
|
add_header Vary "Accept-Encoding";
|
|
add_header Pragma "public";
|
|
add_header Cache-Control "max-age=31536000, public";
|
|
}
|
|
location ~ /wp-content/cache/minify/.*\.css$ {
|
|
types {}
|
|
default_type text/css;
|
|
expires modified 31536000s;
|
|
add_header X-Powered-By "W3 Total Cache/0.9.7";
|
|
add_header Vary "Accept-Encoding";
|
|
add_header Pragma "public";
|
|
add_header Cache-Control "max-age=31536000, public";
|
|
}
|
|
location ~ /wp-content/cache/minify/.*js_gzip$ {
|
|
gzip off;
|
|
types {}
|
|
default_type application/x-javascript;
|
|
expires modified 31536000s;
|
|
add_header X-Powered-By "W3 Total Cache/0.9.7";
|
|
add_header Vary "Accept-Encoding";
|
|
add_header Pragma "public";
|
|
add_header Cache-Control "max-age=31536000, public";
|
|
add_header Content-Encoding gzip;
|
|
}
|
|
location ~ /wp-content/cache/minify/.*css_gzip$ {
|
|
gzip off;
|
|
types {}
|
|
default_type text/css;
|
|
expires modified 31536000s;
|
|
add_header X-Powered-By "W3 Total Cache/0.9.7";
|
|
add_header Vary "Accept-Encoding";
|
|
add_header Pragma "public";
|
|
add_header Cache-Control "max-age=31536000, public";
|
|
add_header Content-Encoding gzip;
|
|
}
|
|
# END W3TC Minify cache
|
|
# BEGIN W3TC Browser Cache
|
|
gzip on;
|
|
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/bmp application/java application/msword application/vnd.ms-fontobject application/x-msdownload image/x-icon image/webp application/json application/vnd.ms-access application/vnd.ms-project application/x-font-otf application/vnd.ms-opentype application/vnd.oasis.opendocument.database application/vnd.oasis.opendocument.chart application/vnd.oasis.opendocument.formula application/vnd.oasis.opendocument.graphics application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg application/pdf application/vnd.ms-powerpoint application/x-shockwave-flash image/tiff application/x-font-ttf audio/wav application/vnd.ms-write application/font-woff application/font-woff2 application/vnd.ms-excel;
|
|
location ~ \.(css|htc|less|js|js2|js3|js4)$ {
|
|
expires 31536000s;
|
|
etag on;
|
|
if_modified_since exact;
|
|
add_header Pragma "public";
|
|
add_header Cache-Control "max-age=31536000, public";
|
|
add_header X-Powered-By "W3 Total Cache/0.9.7";
|
|
try_files $uri $uri/ $uri.html /index.php?$args;
|
|
}
|
|
location ~ \.(html|htm|rtf|rtx|svg|txt|xsd|xsl|xml)$ {
|
|
expires 3600s;
|
|
etag on;
|
|
if_modified_since exact;
|
|
add_header Pragma "public";
|
|
add_header Cache-Control "max-age=3600, public";
|
|
add_header X-Powered-By "W3 Total Cache/0.9.7";
|
|
try_files $uri $uri/ $uri.html /index.php?$args;
|
|
}
|
|
location ~ \.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|webp|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|_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|_ttf|wav|wma|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|zip)$ {
|
|
expires 31536000s;
|
|
etag on;
|
|
if_modified_since exact;
|
|
add_header Pragma "public";
|
|
add_header Cache-Control "max-age=31536000, public";
|
|
add_header X-Powered-By "W3 Total Cache/0.9.7";
|
|
add_header Link "<$scheme://$host$uri>; rel=\"canonical\"";
|
|
if ($request_uri ~ ^[^?]*\.(ttf|ttc|otf|eot|woff|woff2|font.css)(\?|$)) {
|
|
add_header Link "<$scheme://$host$uri>; rel=\"canonical\"";
|
|
add_header Pragma "public";
|
|
add_header Cache-Control "max-age=31536000, public";
|
|
add_header X-Powered-By "W3 Total Cache/0.9.7";
|
|
add_header Access-Control-Allow-Origin "*";
|
|
}
|
|
try_files $uri $uri/ $uri.html /index.php?$args;
|
|
}
|
|
location ~ \.(bmp|class|doc|docx|eot|exe|ico|webp|json|mdb|mpp|otf|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|pot|pps|ppt|pptx|svg|svgz|swf|tif|tiff|ttf|ttc|_ttf|wav|wri|woff|woff2|xla|xls|xlsx|xlt|xlw)$ {
|
|
etag off;
|
|
if_modified_since off;
|
|
try_files $uri $uri/ $uri.html /index.php?$args;
|
|
}
|
|
add_header Strict-Transport-Security "max-age=31536000";
|
|
add_header X-XSS-Protection "1; mode=block";
|
|
add_header X-Content-Type-Options "nosniff";
|
|
add_header Referrer-Policy "";
|
|
# END W3TC Browser Cache
|