Commit 20aae23e authored by memtkmcc's avatar memtkmcc

Issue #3149961: Nginx - Leave tcp_nodelay, tcp_nopush and keepalive_requests...

Issue #3149961: Nginx - Leave tcp_nodelay, tcp_nopush and keepalive_requests for /etc/nginx/nginx.conf
parent 52eb2ff1
......@@ -189,7 +189,6 @@ location ^~ /admin/httprl-test {
### CDN Far Future expiration support.
###
location ^~ /cdn/farfuture/ {
tcp_nodelay off;
access_log off;
log_not_found off;
<?php if ($nginx_has_etag): ?>
......@@ -307,8 +306,6 @@ location = /fpm-ping {
### for running sites cron.
###
location = /cron.php {
tcp_nopush off;
keepalive_requests 0;
<?php if ($satellite_mode == 'boa'): ?>
allow 127.0.0.1;
deny all;
......@@ -500,7 +497,6 @@ location ^~ /audio/download {
if ( $is_bot ) {
return 403;
}
tcp_nopush off;
access_log off;
log_not_found off;
set $nocache_details "Skip";
......@@ -792,7 +788,6 @@ location ~* \.css$ {
}
error_page 405 = @uncached;
access_log off;
tcp_nodelay off;
expires max; #if using aggregator
add_header Access-Control-Allow-Origin *;
add_header X-Content-Type-Options nosniff;
......@@ -819,7 +814,6 @@ location ~* \.(?:js|htc)$ {
}
error_page 405 = @uncached;
access_log off;
tcp_nodelay off;
expires max; # if using aggregator
add_header Access-Control-Allow-Origin *;
add_header X-Content-Type-Options nosniff;
......@@ -843,7 +837,6 @@ location ~* ^/sites/.*/files/.*\.json$ {
}
error_page 405 = @uncached;
access_log off;
tcp_nodelay off;
expires max; ### if using aggregator
add_header Access-Control-Allow-Origin *;
add_header X-Content-Type-Options nosniff;
......@@ -875,8 +868,6 @@ location ^~ /files/ {
###
location ~* /files/.+\.flv$ {
flv;
tcp_nodelay off;
tcp_nopush off;
expires 30d;
access_log off;
log_not_found off;
......@@ -894,8 +885,6 @@ location ^~ /files/ {
mp4;
mp4_buffer_size 1m;
mp4_max_buffer_size 5m;
tcp_nodelay off;
tcp_nopush off;
expires 30d;
access_log off;
log_not_found off;
......@@ -941,7 +930,6 @@ location ^~ /files/ {
location ~* ^.+\.(?:pdf|jpe?g|gif|png|ico|bmp|svg|swf|docx?|xlsx?|pptx?|tiff?|txt|rtf|vcard|vcf|cgi|bat|pl|dll|class|otf|ttf|woff2?|eot|less|avi|mpe?g|mov|wmv|mp3|ogg|ogv|wav|midi|zip|tar|t?gz|rar|dmg|exe|apk|pxl|ipa|css|js)$ {
expires 30d;
tcp_nodelay off;
access_log off;
log_not_found off;
rewrite ^/files/(.*)$ /sites/$main_site_name/files/$1 last;
......@@ -960,7 +948,6 @@ location ^~ /files/ {
location ^~ /downloads/ {
location ~* ^.+\.(?:pdf|jpe?g|gif|png|ico|bmp|svg|swf|docx?|xlsx?|pptx?|tiff?|txt|rtf|vcard|vcf|cgi|bat|pl|dll|class|otf|ttf|woff2?|eot|less|avi|mpe?g|mov|wmv|mp3|ogg|ogv|wav|midi|zip|tar|t?gz|rar|dmg|exe|apk|pxl|ipa)$ {
expires 30d;
tcp_nodelay off;
access_log off;
log_not_found off;
add_header Access-Control-Allow-Origin *;
......@@ -982,7 +969,6 @@ location ^~ /downloads/ {
###
location ~* ^.+\.(?:jpe?g|gif|png|ico|bmp|svg|swf|docx?|xlsx?|pptx?|tiff?|txt|rtf|vcard|vcf|cgi|bat|pl|dll|class|otf|ttf|woff2?|eot|less|mp3|wav|midi)$ {
expires 30d;
tcp_nodelay off;
access_log off;
log_not_found off;
add_header Access-Control-Allow-Origin *;
......@@ -999,8 +985,6 @@ location ~* ^.+\.(?:jpe?g|gif|png|ico|bmp|svg|swf|docx?|xlsx?|pptx?|tiff?|txt|rt
###
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;
add_header Access-Control-Allow-Origin *;
......@@ -1018,7 +1002,6 @@ location ~* ^.+\.(?:avi|mpe?g|mov|wmv|ogg|ogv|zip|tar|t?gz|rar|dmg|exe|apk|pxl|i
###
location ~* ^/sites/.+/files/.+\.(?:pdf|aspx?)$ {
expires 30d;
tcp_nodelay off;
access_log off;
log_not_found off;
add_header Access-Control-Allow-Origin *;
......@@ -1033,8 +1016,6 @@ location ~* ^/sites/.+/files/.+\.(?:pdf|aspx?)$ {
###
location ~* ^.+\.flv$ {
flv;
tcp_nodelay off;
tcp_nopush off;
expires 30d;
access_log off;
log_not_found off;
......@@ -1051,8 +1032,6 @@ location ~* ^.+\.(?:mp4|m4a)$ {
mp4;
mp4_buffer_size 1m;
mp4_max_buffer_size 5m;
tcp_nodelay off;
tcp_nopush off;
expires 30d;
access_log off;
log_not_found off;
......@@ -1068,7 +1047,6 @@ location ~* ^.+\.(?:mp4|m4a)$ {
###
location ~* /(?:cross-?domain)\.xml$ {
access_log off;
tcp_nodelay off;
expires 30d;
add_header Access-Control-Allow-Origin *;
add_header X-Content-Type-Options nosniff;
......@@ -1084,8 +1062,6 @@ location ~* /(?:modules|libraries)/(?:contrib/)?(?:ad|tinybrowser|f?ckeditor|tin
<?php if ($satellite_mode == 'boa'): ?>
limit_conn limreq 88;
<?php endif; ?>
tcp_nopush off;
keepalive_requests 0;
access_log off;
if ( $is_bot ) {
return 403;
......@@ -1125,7 +1101,6 @@ location ~* ^/sites/.*/(?:modules|libraries)/(?:contrib/)?(?:tinybrowser|f?ckedi
return 403;
}
access_log off;
tcp_nodelay off;
expires 30d;
add_header Access-Control-Allow-Origin *;
add_header X-Content-Type-Options nosniff;
......@@ -1138,7 +1113,6 @@ location ~* ^/sites/.*/(?:modules|libraries)/(?:contrib/)?(?:tinybrowser|f?ckedi
###
location ~* ^/sites/.*/files/ {
access_log off;
tcp_nodelay off;
expires 30d;
add_header Access-Control-Allow-Origin *;
add_header X-Content-Type-Options nosniff;
......@@ -1288,8 +1262,6 @@ location ~ ^/(?<esi>esi/.*)"$ {
fastcgi_no_cache $cookie_NoCacheID $http_authorization $nocache;
fastcgi_cache_bypass $cookie_NoCacheID $http_authorization $nocache;
fastcgi_cache_use_stale error http_500 http_503 invalid_header timeout updating;
tcp_nopush off;
keepalive_requests 0;
expires epoch;
}
......@@ -1441,8 +1413,6 @@ location = /index.php {
add_header X-XSS-Protection "1; mode=block";
<?php endif; ?>
add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
tcp_nopush off;
keepalive_requests 0;
try_files $uri =404; ### check for existence of php file first
<?php if ($satellite_mode == 'boa'): ?>
fastcgi_pass unix:/var/run/$user_socket.fpm.socket;
......@@ -1496,8 +1466,6 @@ location ~* ^/(?:index|cron|boost_stats|update|authorize|xmlrpc)\.php$ {
return 404;
}
<?php endif; ?>
tcp_nopush off;
keepalive_requests 0;
access_log off;
try_files $uri =404; ### check for existence of php file first
<?php if ($satellite_mode == 'boa'): ?>
......@@ -1526,8 +1494,6 @@ location ~* ^/(?:core/)?(?:authorize|update)\.php$ {
###
location @allowupdate {
limit_conn limreq 88;
tcp_nopush off;
keepalive_requests 0;
access_log off;
try_files $uri =404; ### check for existence of php file first
<?php if ($satellite_mode == 'boa'): ?>
......
......@@ -247,7 +247,6 @@ location ^~ /<?php print $subdir; ?> {
### CDN Far Future expiration support.
###
location ^~ /<?php print $subdir; ?>/cdn/farfuture/ {
tcp_nodelay off;
access_log off;
log_not_found off;
etag off;
......@@ -339,8 +338,6 @@ location ^~ /<?php print $subdir; ?> {
set $real_fastcgi_script_name cron.php;
fastcgi_param SCRIPT_FILENAME <?php print "{$this->root}"; ?>/$real_fastcgi_script_name;
tcp_nopush off;
keepalive_requests 0;
<?php if ($satellite_mode == 'boa'): ?>
allow 127.0.0.1;
deny all;
......@@ -459,7 +456,6 @@ location ^~ /<?php print $subdir; ?> {
if ( $is_bot ) {
return 403;
}
tcp_nopush off;
access_log off;
log_not_found off;
set $nocache_details "Skip";
......@@ -571,7 +567,6 @@ location ^~ /<?php print $subdir; ?> {
location ~* ^.+\.(?:pdf|jpe?g|gif|png|ico|bmp|svg|swf|docx?|xlsx?|pptx?|tiff?|txt|rtf|vcard|vcf|cgi|bat|pl|dll|class|otf|ttf|woff2?|eot|less|avi|mpe?g|mov|wmv|mp3|ogg|ogv|wav|midi|zip|tar|t?gz|rar|dmg|exe|apk|pxl|ipa|css|js)$ {
expires 30d;
tcp_nodelay off;
access_log off;
log_not_found off;
rewrite ^/<?php print $subdir; ?>/files/(.*)$ /<?php print $subdir; ?>/sites/$subdir_main_site_name/files/$1 last;
......@@ -714,7 +709,6 @@ location ^~ /<?php print $subdir; ?> {
###
location ~* ^/<?php print $subdir; ?>/(.*\.css)$ {
access_log off;
tcp_nodelay off;
expires max; #if using aggregator
add_header Access-Control-Allow-Origin *;
add_header X-Content-Type-Options nosniff;
......@@ -727,7 +721,6 @@ location ^~ /<?php print $subdir; ?> {
###
location ~* ^/<?php print $subdir; ?>/(.*\.(?:js|htc))$ {
access_log off;
tcp_nodelay off;
expires max; # if using aggregator
add_header Access-Control-Allow-Origin *;
add_header X-Content-Type-Options nosniff;
......@@ -740,7 +733,6 @@ location ^~ /<?php print $subdir; ?> {
###
location ~* ^/<?php print $subdir; ?>/sites/.*/files/(.*\.json)$ {
access_log off;
tcp_nodelay off;
expires max; ### if using aggregator
add_header Access-Control-Allow-Origin *;
add_header X-Content-Type-Options nosniff;
......@@ -762,7 +754,6 @@ location ^~ /<?php print $subdir; ?> {
###
location ~* ^/<?php print $subdir; ?>/(.+\.(?:jpe?g|gif|png|ico|bmp|svg|swf|pdf|docx?|xlsx?|pptx?|tiff?|txt|rtf|vcard|vcf|cgi|bat|pl|dll|aspx?|class|otf|ttf|woff2?|eot|less))$ {
expires 30d;
tcp_nodelay off;
access_log off;
log_not_found off;
add_header Access-Control-Allow-Origin *;
......@@ -777,8 +768,6 @@ location ^~ /<?php print $subdir; ?> {
###
location ~* ^/<?php print $subdir; ?>/(.+\.(?:avi|mpe?g|mov|wmv|mp3|mp4|m4a|ogg|ogv|flv|wav|midi|zip|tar|t?gz|rar|dmg|exe))$ {
expires 30d;
tcp_nodelay off;
tcp_nopush off;
access_log off;
log_not_found off;
add_header Access-Control-Allow-Origin *;
......@@ -792,7 +781,6 @@ location ^~ /<?php print $subdir; ?> {
###
location ~* ^/<?php print $subdir; ?>/((?:cross-?domain)\.xml)$ {
access_log off;
tcp_nodelay off;
expires 30d;
add_header Access-Control-Allow-Origin *;
add_header X-Content-Type-Options nosniff;
......@@ -833,8 +821,6 @@ location ^~ /<?php print $subdir; ?> {
set $real_fastcgi_script_name $1;
fastcgi_param SCRIPT_FILENAME <?php print "{$this->root}"; ?>/$real_fastcgi_script_name;
tcp_nopush off;
keepalive_requests 0;
access_log off;
if ( $is_bot ) {
return 403;
......@@ -874,7 +860,6 @@ location ^~ /<?php print $subdir; ?> {
return 403;
}
access_log off;
tcp_nodelay off;
expires 30d;
add_header Access-Control-Allow-Origin *;
add_header X-Content-Type-Options nosniff;
......@@ -889,7 +874,6 @@ location ^~ /<?php print $subdir; ?> {
root <?php print "{$this->root}"; ?>;
rewrite ^/<?php print $subdir; ?>/sites/(.*)$ /sites/$subdir_main_site_name/$1 last;
access_log off;
tcp_nodelay off;
expires 30d;
add_header Access-Control-Allow-Origin *;
add_header X-Content-Type-Options nosniff;
......@@ -1039,8 +1023,6 @@ location ^~ /<?php print $subdir; ?> {
set $real_fastcgi_script_name $1.php;
fastcgi_param SCRIPT_FILENAME <?php print "{$this->root}"; ?>/$real_fastcgi_script_name;
tcp_nopush off;
keepalive_requests 0;
access_log off;
try_files /$1.php =404; ### check for existence of php file first
<?php if ($satellite_mode == 'boa'): ?>
......@@ -1125,8 +1107,6 @@ location ^~ /<?php print $subdir; ?> {
fastcgi_param PHP_SELF /<?php print $subdir; ?>/$real_fastcgi_script_name;
add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
tcp_nopush off;
keepalive_requests 0;
try_files /index.php =404; ### check for existence of php file first
<?php if ($satellite_mode == 'boa'): ?>
fastcgi_pass unix:/var/run/$user_socket.fpm.socket;
......@@ -1274,8 +1254,6 @@ location @allowupdate_<?php print $subdir_loc; ?> {
fastcgi_param SCRIPT_FILENAME <?php print "{$this->root}"; ?>/$real_fastcgi_script_name;
tcp_nopush off;
keepalive_requests 0;
access_log off;
try_files /$real_fastcgi_script_name =404; ### check for existence of php file first
......
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