2017-09-16 20:37:13 +00:00
|
|
|
# NGINX CONFIGURATION FOR COMMON LOCATION
|
|
|
|
# DO NOT MODIFY, ALL CHANGES LOST AFTER UPDATE Webinoly
|
2018-06-22 14:53:29 +00:00
|
|
|
|
2017-09-16 20:37:13 +00:00
|
|
|
# Basic locations files
|
|
|
|
location = /favicon.ico {
|
2018-06-22 14:53:29 +00:00
|
|
|
access_log off;
|
|
|
|
log_not_found off;
|
|
|
|
expires max;
|
2017-09-16 20:37:13 +00:00
|
|
|
}
|
|
|
|
location = /robots.txt {
|
2018-06-22 14:53:29 +00:00
|
|
|
try_files $uri $uri/ /index.php?$args;
|
|
|
|
access_log off;
|
|
|
|
log_not_found off;
|
2017-09-16 20:37:13 +00:00
|
|
|
}
|
2018-06-22 14:53:29 +00:00
|
|
|
|
2017-09-16 20:37:13 +00:00
|
|
|
# Cache static files
|
|
|
|
location ~* \.(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|swf)$ {
|
2018-06-22 14:53:29 +00:00
|
|
|
include common/headers-http.conf;
|
|
|
|
include common/headers-https.conf;
|
|
|
|
add_header "Access-Control-Allow-Origin" "*";
|
|
|
|
access_log off;
|
|
|
|
log_not_found off;
|
|
|
|
expires max;
|
2017-09-16 20:37:13 +00:00
|
|
|
}
|
2018-06-22 14:53:29 +00:00
|
|
|
|
2017-09-16 20:37:13 +00:00
|
|
|
# Security settings for better privacy
|
|
|
|
# Deny hidden files
|
|
|
|
location ~ /\.well-known {
|
2018-06-22 14:53:29 +00:00
|
|
|
allow all;
|
2017-09-16 20:37:13 +00:00
|
|
|
}
|
|
|
|
location ~ /\. {
|
2018-06-22 14:53:29 +00:00
|
|
|
deny all;
|
|
|
|
access_log off;
|
|
|
|
log_not_found off;
|
2017-09-16 20:37:13 +00:00
|
|
|
}
|
2018-06-22 14:53:29 +00:00
|
|
|
|
2017-09-16 20:37:13 +00:00
|
|
|
# Deny backup extensions & log files
|
|
|
|
location ~* ^.+\.(bak|log|old|orig|original|php#|php~|php_bak|save|swo|swp|sql)$ {
|
2018-06-22 14:53:29 +00:00
|
|
|
deny all;
|
|
|
|
access_log off;
|
|
|
|
log_not_found off;
|
2017-09-16 20:37:13 +00:00
|
|
|
}
|
2018-06-22 14:53:29 +00:00
|
|
|
|
2017-09-16 20:37:13 +00:00
|
|
|
# Return 403 forbidden for readme.(txt|html) or license.(txt|html) or example.(txt|html)
|
|
|
|
if ($uri ~* "^.+(readme|license|example)\.(txt|html)$") {
|
2018-06-22 14:53:29 +00:00
|
|
|
return 403;
|
2017-09-16 20:37:13 +00:00
|
|
|
}
|