Commit aebbb49b authored by memtkmcc's avatar memtkmcc Committed by memtkmcc

Issue #2820486 by memtkmcc: Nginx - do not log media files requests

parent 70ccc449
......@@ -450,7 +450,8 @@ location ^~ /audio/download {
return 403;
}
tcp_nopush off;
access_log off;
access_log off;
log_not_found off;
set $nocache_details "Skip";
try_files $uri @drupal;
}
......@@ -829,13 +830,15 @@ location ~* ^.+\.(?:jpe?g|gif|png|ico|bmp|svg|swf|docx?|xlsx?|pptx?|tiff?|txt|rt
}
###
### Serve & log bigger media/static/archive files directly,
### Serve bigger media/static/archive files directly,
### without all standard drupal rewrites, php-fpm etc.
###
location ~* ^.+\.(?:avi|mpe?g|mov|wmv|ogg|ogv|zip|tar|t?gz|rar|dmg|exe|apk|pxl|ipa)$ {
expires 30d;
tcp_nodelay off;
tcp_nopush off;
access_log off;
log_not_found off;
rewrite ^/.+/sites/.+/files/(.*)$ /sites/$main_site_name/files/$1 last;
try_files $uri =404;
}
......@@ -863,6 +866,8 @@ location ~* ^.+\.flv$ {
tcp_nodelay off;
tcp_nopush off;
expires 30d;
access_log off;
log_not_found off;
try_files $uri =404;
}
......@@ -876,6 +881,8 @@ location ~* ^.+\.(?:mp4|m4a)$ {
tcp_nodelay off;
tcp_nopush off;
expires 30d;
access_log off;
log_not_found off;
try_files $uri =404;
}
<?php endif; ?>
......
......@@ -426,7 +426,8 @@ location ^~ /<?php print $subdir; ?> {
return 403;
}
tcp_nopush off;
access_log off;
access_log off;
log_not_found off;
set $nocache_details "Skip";
try_files /$1 $uri @drupal_<?php print $subdir_loc; ?>;
}
......@@ -711,6 +712,8 @@ location ^~ /<?php print $subdir; ?> {
expires 30d;
tcp_nodelay off;
tcp_nopush off;
access_log off;
log_not_found off;
try_files /$1 $uri =404;
}
......
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