Commit 903636ea authored by memtkmcc's avatar memtkmcc

Nginx: Sync subdir template

parent 45d350bd
...@@ -28,6 +28,11 @@ if (!$nginx_is_modern && $server->nginx_is_modern) { ...@@ -28,6 +28,11 @@ if (!$nginx_is_modern && $server->nginx_is_modern) {
$nginx_is_modern = $server->nginx_is_modern; $nginx_is_modern = $server->nginx_is_modern;
} }
$nginx_has_etag = drush_get_option('nginx_has_etag');
if (!$nginx_has_etag && $server->nginx_has_etag) {
$nginx_has_etag = $server->nginx_has_etag;
}
$nginx_has_http2 = drush_get_option('nginx_has_http2'); $nginx_has_http2 = drush_get_option('nginx_has_http2');
if (!$nginx_has_http2 && $server->nginx_has_http2) { if (!$nginx_has_http2 && $server->nginx_has_http2) {
$nginx_has_http2 = $server->nginx_has_http2; $nginx_has_http2 = $server->nginx_has_http2;
...@@ -453,7 +458,15 @@ location ^~ /<?php print $subdir; ?> { ...@@ -453,7 +458,15 @@ location ^~ /<?php print $subdir; ?> {
### ###
### Deny listed requests for security reasons. ### Deny listed requests for security reasons.
### ###
location ~* /files/civicrm/(?:ConfigAndLog|upload|templates_c) { location ~* /files/civicrm/(?:ConfigAndLog|custom|upload|templates_c) {
access_log off;
return 404;
}
###
### Deny often flooded URI for performance reasons
###
location = /<?php print $subdir; ?>/autodiscover/autodiscover.xml {
access_log off; access_log off;
return 404; return 404;
} }
...@@ -640,7 +653,7 @@ location ^~ /<?php print $subdir; ?> { ...@@ -640,7 +653,7 @@ location ^~ /<?php print $subdir; ?> {
location ~* ^/<?php print $subdir; ?>/(.*/files/advagg_(?:css|js).*) { location ~* ^/<?php print $subdir; ?>/(.*/files/advagg_(?:css|js).*) {
expires max; expires max;
access_log off; access_log off;
<?php if ($nginx_is_modern): ?> <?php if ($nginx_has_etag): ?>
etag off; etag off;
<?php else: ?> <?php else: ?>
add_header ETag ""; add_header ETag "";
...@@ -822,10 +835,6 @@ location ^~ /<?php print $subdir; ?> { ...@@ -822,10 +835,6 @@ location ^~ /<?php print $subdir; ?> {
### Make feeds compatible with boost caching and set correct mime type. ### Make feeds compatible with boost caching and set correct mime type.
### ###
location ~* ^/<?php print $subdir; ?>/(.*\.xml)$ { location ~* ^/<?php print $subdir; ?>/(.*\.xml)$ {
location ~* ^/<?php print $subdir; ?>/autodiscover/autodiscover\.xml {
access_log off;
return 400;
}
if ( $request_method = POST ) { if ( $request_method = POST ) {
return 405; return 405;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment