Commit 6f86539e authored by omega8cc's avatar omega8cc

Issue #2259461 by Liam McDermott - Remove too aggressive limit_conn directive...

Issue #2259461 by Liam McDermott - Remove too aggressive limit_conn directive in the Nginx config templates.
parent 9019438a
...@@ -265,7 +265,6 @@ location ~* wysiwyg_fields/(?:plugins|scripts)/.*\.(?:js|css) { ...@@ -265,7 +265,6 @@ location ~* wysiwyg_fields/(?:plugins|scripts)/.*\.(?:js|css) {
location ~* files/advagg_(?:css|js)/ { location ~* files/advagg_(?:css|js)/ {
access_log off; access_log off;
expires max; expires max;
limit_conn gulag 88;
rewrite ^/files/advagg_(.*)/(.*)$ /sites/$server_name/files/advagg_$1/$2 last; rewrite ^/files/advagg_(.*)/(.*)$ /sites/$server_name/files/advagg_$1/$2 last;
add_header ETag ""; add_header ETag "";
add_header Cache-Control "max-age=290304000, no-transform, public"; add_header Cache-Control "max-age=290304000, no-transform, public";
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
####################################################### #######################################################
server { server {
limit_conn gulag 32; # like mod_evasive - this allows max 32 simultaneous connections from one IP address
<?php foreach ($server->ip_addresses as $ip) :?> <?php foreach ($server->ip_addresses as $ip) :?>
listen <?php print $ip . ':' . $http_ssl_port; ?>; listen <?php print $ip . ':' . $http_ssl_port; ?>;
<?php endforeach; ?> <?php endforeach; ?>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<?php if ($this->redirection): ?> <?php if ($this->redirection): ?>
<?php foreach ($this->aliases as $alias_url): ?> <?php foreach ($this->aliases as $alias_url): ?>
server { server {
limit_conn gulag 32;
listen <?php print "{$ip_address}:{$http_ssl_port}"; ?>; listen <?php print "{$ip_address}:{$http_ssl_port}"; ?>;
server_name <?php print $alias_url; ?>; server_name <?php print $alias_url; ?>;
ssl on; ssl on;
...@@ -29,7 +28,6 @@ server { ...@@ -29,7 +28,6 @@ server {
fastcgi_param db_passwd <?php print urlencode($db_passwd); ?>; fastcgi_param db_passwd <?php print urlencode($db_passwd); ?>;
fastcgi_param db_host <?php print urlencode($db_host); ?>; fastcgi_param db_host <?php print urlencode($db_host); ?>;
fastcgi_param db_port <?php print urlencode($db_port); ?>; fastcgi_param db_port <?php print urlencode($db_port); ?>;
limit_conn gulag 32; # like mod_evasive - this allows max 32 simultaneous connections from one IP address
listen <?php print "{$ip_address}:{$http_ssl_port}"; ?>; listen <?php print "{$ip_address}:{$http_ssl_port}"; ?>;
server_name <?php print $this->uri; ?><?php if (!$this->redirection && is_array($this->aliases)) : foreach ($this->aliases as $alias_url) : if (trim($alias_url)) : ?> <?php print $alias_url; ?><?php endif; endforeach; endif; ?>; server_name <?php print $this->uri; ?><?php if (!$this->redirection && is_array($this->aliases)) : foreach ($this->aliases as $alias_url) : if (trim($alias_url)) : ?> <?php print $alias_url; ?><?php endif; endforeach; endif; ?>;
root <?php print "{$this->root}"; ?>; root <?php print "{$this->root}"; ?>;
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<?php if ($this->ssl_enabled && $this->ssl_key) : ?> <?php if ($this->ssl_enabled && $this->ssl_key) : ?>
server { server {
limit_conn gulag 32;
listen <?php print "{$ip_address}:{$http_ssl_port}"; ?>; listen <?php print "{$ip_address}:{$http_ssl_port}"; ?>;
server_name <?php print $this->uri . ' ' . implode(' ', $this->aliases); ?>; server_name <?php print $this->uri . ' ' . implode(' ', $this->aliases); ?>;
ssl on; ssl on;
......
...@@ -162,7 +162,6 @@ map $args $is_denied { ...@@ -162,7 +162,6 @@ map $args $is_denied {
####################################################### #######################################################
server { server {
limit_conn gulag 32; # like mod_evasive - this allows max 32 simultaneous connections from one IP address
listen *:<?php print $http_port; ?>; listen *:<?php print $http_port; ?>;
server_name _; server_name _;
location / { location / {
......
...@@ -273,7 +273,6 @@ location ^~ /<?php print $subdir; ?> { ...@@ -273,7 +273,6 @@ location ^~ /<?php print $subdir; ?> {
location ~* ^/<?php print $subdir; ?>/(.*/files/advagg_(?:css|js).*) { location ~* ^/<?php print $subdir; ?>/(.*/files/advagg_(?:css|js).*) {
access_log off; access_log off;
expires max; expires max;
limit_conn limreq 88;
add_header ETag ""; add_header ETag "";
add_header Cache-Control "max-age=290304000, no-transform, public"; add_header Cache-Control "max-age=290304000, no-transform, public";
add_header Last-Modified "Wed, 20 Jan 1988 04:20:42 GMT"; add_header Last-Modified "Wed, 20 Jan 1988 04:20:42 GMT";
......
server { server {
limit_conn gulag 32; # like mod_evasive - this allows max 32 simultaneous connections from one IP address
listen *:<?php print $http_port; ?>; listen *:<?php print $http_port; ?>;
server_name <?php print $uri; ?>; server_name <?php print $uri; ?>;
include <?php print $subdirs_path; ?>/<?php print $uri; ?>/*.conf; include <?php print $subdirs_path; ?>/<?php print $uri; ?>/*.conf;
......
...@@ -4,7 +4,6 @@ if ($ssl_redirection || $this->redirection) { ...@@ -4,7 +4,6 @@ if ($ssl_redirection || $this->redirection) {
foreach ($this->aliases as $alias_url) { foreach ($this->aliases as $alias_url) {
print "# alias redirection virtual host\n"; print "# alias redirection virtual host\n";
print "server {\n"; print "server {\n";
print " limit_conn gulag 32;\n";
print " listen *:{$http_port};\n"; print " listen *:{$http_port};\n";
// if we use redirections, we need to change the redirection // if we use redirections, we need to change the redirection
// target to be the original site URL ($this->uri instead of // target to be the original site URL ($this->uri instead of
...@@ -32,7 +31,6 @@ server { ...@@ -32,7 +31,6 @@ server {
fastcgi_param db_passwd <?php print urlencode($db_passwd); ?>; fastcgi_param db_passwd <?php print urlencode($db_passwd); ?>;
fastcgi_param db_host <?php print urlencode($db_host); ?>; fastcgi_param db_host <?php print urlencode($db_host); ?>;
fastcgi_param db_port <?php print urlencode($db_port); ?>; fastcgi_param db_port <?php print urlencode($db_port); ?>;
limit_conn gulag 32; # like mod_evasive - this allows max 32 simultaneous connections from one IP address
listen *:<?php print $http_port; ?>; listen *:<?php print $http_port; ?>;
server_name <?php server_name <?php
// this is the main vhost, so we need to put the redirection // this is the main vhost, so we need to put the redirection
......
server { server {
limit_conn gulag 32;
listen *:<?php print $http_port; ?>; listen *:<?php print $http_port; ?>;
server_name <?php print $this->uri . ' ' . implode(' ', $this->aliases); ?>; server_name <?php print $this->uri . ' ' . implode(' ', $this->aliases); ?>;
return 404; return 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