Commit e2c2ac10 authored by omega8cc's avatar omega8cc

Use higher values for limit_conn to avoid issues when there are many files...

Use higher values for limit_conn to avoid issues when there are many files included in the page and to better support advagg module.
parent e23e4051
......@@ -273,7 +273,7 @@ location ~* /files/private/ {
location ~* files/advagg_(?:css|js)/ {
access_log off;
expires max;
limit_conn gulag 50;
limit_conn gulag 88;
rewrite ^/files/advagg_(.*)/(.*)$ /sites/$host/files/advagg_$1/$2 last;
add_header ETag "";
add_header Cache-Control "max-age=290304000, no-transform, public";
......
......@@ -259,7 +259,7 @@ location ~* /files/private/ {
location ~* files/advagg_(?:css|js)/ {
access_log off;
expires max;
limit_conn gulag 50;
limit_conn gulag 88;
rewrite ^/files/advagg_(.*)/(.*)$ /sites/$host/files/advagg_$1/$2 last;
add_header ETag "";
add_header Cache-Control "max-age=290304000, no-transform, public";
......
......@@ -181,7 +181,7 @@ map $args $is_denied {
$ip_address = !empty($ip_address) ? $ip_address : '*';
?>
server {
limit_conn gulag 18; # like mod_evasive - this allows max 18 simultaneous connections from one IP address
limit_conn gulag 32; # like mod_evasive - this allows max 18 simultaneous connections from one IP address
<?php
if ($ip_address == '*') {
print " listen {$ip_address}:{$http_port};\n";
......
......@@ -4,7 +4,7 @@ if ($ssl_redirection || $this->redirection) {
// Redirect all aliases to the main http url using separate vhosts blocks to avoid if{} in Nginx.
foreach ($this->aliases as $alias_url) {
print "server {\n";
print " limit_conn gulag 18;\n";
print " limit_conn gulag 32;\n";
if ($ip_address == '*') {
print " listen {$ip_address}:{$http_port};\n";
}
......@@ -23,7 +23,7 @@ if ($ssl_redirection || $this->redirection) {
server {
include <?php print "{$server->include_path}"; ?>/fastcgi_params.conf;
limit_conn gulag 18; # like mod_evasive - this allows max 18 simultaneous connections from one IP address
limit_conn gulag 32; # like mod_evasive - this allows max 18 simultaneous connections from one IP address
<?php
if ($ip_address == '*') {
print " listen {$ip_address}:{$http_port};\n";
......
......@@ -2,7 +2,7 @@
$ip_address = !empty($ip_address) ? $ip_address : '*';
?>
server {
limit_conn gulag 18;
limit_conn gulag 32;
<?php
if ($ip_address == '*') {
print " listen {$ip_address}:{$http_port};\n";
......
......@@ -5,7 +5,7 @@
#######################################################
server {
limit_conn gulag 18; # like mod_evasive - this allows max 18 simultaneous connections from one IP address
limit_conn gulag 32; # like mod_evasive - this allows max 18 simultaneous connections from one IP address
<?php foreach ($server->ip_addresses as $ip) :?>
listen <?php print $ip . ':' . $http_ssl_port; ?>;
<?php endforeach; ?>
......
......@@ -4,7 +4,7 @@
<?php if ($this->redirection): ?>
<?php foreach ($this->aliases as $alias_url): ?>
server {
limit_conn gulag 18;
limit_conn gulag 32;
listen <?php print "{$ip_address}:{$http_ssl_port}"; ?>;
server_name <?php print $alias_url; ?>;
ssl on;
......@@ -21,7 +21,7 @@ server {
server {
include <?php print "{$server->include_path}"; ?>/fastcgi_ssl_params.conf;
limit_conn gulag 18; # like mod_evasive - this allows max 18 simultaneous connections from one IP address
limit_conn gulag 32; # like mod_evasive - this allows max 18 simultaneous connections from one IP address
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; ?>;
root <?php print "{$this->root}"; ?>;
......
......@@ -3,7 +3,7 @@
server {
include <?php print "{$server->include_path}"; ?>/fastcgi_ssl_params.conf;
limit_conn gulag 18;
limit_conn gulag 32;
listen <?php print "{$ip_address}:{$http_ssl_port}"; ?>;
server_name <?php print $this->uri . ' ' . implode(' ', $this->aliases); ?>;
root /var/www/nginx-default;
......
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