69 lines
3.0 KiB
Plaintext
69 lines
3.0 KiB
Plaintext
# rate limiting : defined in /etc/nginx/conf.d/limits.conf
|
|
#limit_req zone=flood burst=30 nodelay;
|
|
#limit_req_status 444;
|
|
|
|
client_body_buffer_size 128M;
|
|
client_max_body_size 128M; # set max upload size
|
|
fastcgi_buffers 512 32K;
|
|
#fastcgi_buffers 64 4K;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.php?q=$uri&$args;
|
|
}
|
|
|
|
# location ~* ^.+\.(xml|ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
|
|
# access_log off; log_not_found off; expires 1m;
|
|
# }
|
|
|
|
# SECURITY : Deny all attempts to access PHP Files in the uploads directory
|
|
location ~* /(?:uploads|files)/.*\.php$ {
|
|
deny all;
|
|
}
|
|
|
|
location /favicon.ico {
|
|
log_not_found off; access_log off;
|
|
}
|
|
|
|
location /robots.txt {
|
|
allow all; log_not_found off; access_log off;
|
|
}
|
|
|
|
# SECURITY : Deny all attempts to access hidden files .abcde
|
|
location ~ /\. {
|
|
deny all;
|
|
}
|
|
|
|
# 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;
|
|
try_files $uri $uri/ $uri.html /index.php?$args;
|
|
}
|
|
|
|
location ~ \.(html|htm|rtf|rtx|svg|txt|xsd|xsl|xml)$ {
|
|
etag on;
|
|
if_modified_since exact;
|
|
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;
|
|
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;
|
|
}
|
|
# END W3TC Browser Cache
|
|
|
|
# BEGIN W3TC Minify core
|
|
rewrite ^/wp-content/cache/minify/ /index.php last;
|
|
# END W3TC Minify core
|