summaryrefslogtreecommitdiffstats
path: root/http/Provision/Config/Nginx/Inc/vhost_include.tpl.php
diff options
context:
space:
mode:
Diffstat (limited to 'http/Provision/Config/Nginx/Inc/vhost_include.tpl.php')
-rw-r--r--http/Provision/Config/Nginx/Inc/vhost_include.tpl.php45
1 files changed, 37 insertions, 8 deletions
diff --git a/http/Provision/Config/Nginx/Inc/vhost_include.tpl.php b/http/Provision/Config/Nginx/Inc/vhost_include.tpl.php
index 12b9957..0d05b11 100644
--- a/http/Provision/Config/Nginx/Inc/vhost_include.tpl.php
+++ b/http/Provision/Config/Nginx/Inc/vhost_include.tpl.php
@@ -49,6 +49,13 @@ if ($is_crawler) {
}
###
+### Block semalt botnet.
+###
+if ($is_botnet) {
+ return 403;
+}
+
+###
### Include high load protection config if exists.
###
include /data/conf/nginx_high_load.c*;
@@ -164,7 +171,9 @@ location = /fpm-status {
access_log off;
allow 127.0.0.1;
deny all;
-<?php if ($phpfpm_mode == 'port'): ?>
+<?php if ($satellite_mode == 'boa'): ?>
+ fastcgi_pass unix:/var/run/www53.fpm.socket;
+<?php elseif ($phpfpm_mode == 'port'): ?>
fastcgi_pass 127.0.0.1:9000;
<?php else: ?>
fastcgi_pass unix:/var/run/php5-fpm.sock;
@@ -178,7 +187,9 @@ location = /fpm-ping {
access_log off;
allow 127.0.0.1;
deny all;
-<?php if ($phpfpm_mode == 'port'): ?>
+<?php if ($satellite_mode == 'boa'): ?>
+ fastcgi_pass unix:/var/run/www53.fpm.socket;
+<?php elseif ($phpfpm_mode == 'port'): ?>
fastcgi_pass 127.0.0.1:9000;
<?php else: ?>
fastcgi_pass unix:/var/run/php5-fpm.sock;
@@ -200,7 +211,9 @@ location = /cron.php {
deny all;
<?php endif; ?>
try_files $uri =404;
-<?php if ($phpfpm_mode == 'port'): ?>
+<?php if ($satellite_mode == 'boa'): ?>
+ fastcgi_pass unix:/var/run/www53.fpm.socket;
+<?php elseif ($phpfpm_mode == 'port'): ?>
fastcgi_pass 127.0.0.1:9000;
<?php else: ?>
fastcgi_pass unix:/var/run/php5-fpm.sock;
@@ -220,7 +233,9 @@ location = /core/cron.php {
deny all;
<?php endif; ?>
try_files $uri =404;
-<?php if ($phpfpm_mode == 'port'): ?>
+<?php if ($satellite_mode == 'boa'): ?>
+ fastcgi_pass unix:/var/run/www53.fpm.socket;
+<?php elseif ($phpfpm_mode == 'port'): ?>
fastcgi_pass 127.0.0.1:9000;
<?php else: ?>
fastcgi_pass unix:/var/run/php5-fpm.sock;
@@ -798,7 +813,9 @@ location ~* /(?:modules|libraries)/(?:contrib/)?(?:ad|tinybrowser|f?ckeditor|tin
return 403;
}
try_files $uri =404;
-<?php if ($phpfpm_mode == 'port'): ?>
+<?php if ($satellite_mode == 'boa'): ?>
+ fastcgi_pass unix:/var/run/www53.fpm.socket;
+<?php elseif ($phpfpm_mode == 'port'): ?>
fastcgi_pass 127.0.0.1:9000;
<?php else: ?>
fastcgi_pass unix:/var/run/php5-fpm.sock;
@@ -941,7 +958,13 @@ location ~ ^/(?<esi>esi/.*)"$ {
###
fastcgi_param QUERY_STRING q=$esi;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
+<?php if ($satellite_mode == 'boa'): ?>
+ fastcgi_pass unix:/var/run/www53.fpm.socket;
+<?php elseif ($phpfpm_mode == 'port'): ?>
fastcgi_pass 127.0.0.1:9000;
+<?php else: ?>
+ fastcgi_pass unix:/var/run/php5-fpm.sock;
+<?php endif; ?>
###
### Use Nginx cache for all visitors.
###
@@ -1080,7 +1103,9 @@ location = /index.php {
tcp_nopush off;
keepalive_requests 0;
try_files $uri =404; ### check for existence of php file first
-<?php if ($phpfpm_mode == 'port'): ?>
+<?php if ($satellite_mode == 'boa'): ?>
+ fastcgi_pass unix:/var/run/www53.fpm.socket;
+<?php elseif ($phpfpm_mode == 'port'): ?>
fastcgi_pass 127.0.0.1:9000;
<?php else: ?>
fastcgi_pass unix:/var/run/php5-fpm.sock;
@@ -1131,7 +1156,9 @@ location ~* ^/(?:index|cron|boost_stats|update|authorize)\.php$ {
keepalive_requests 0;
access_log off;
try_files $uri =404; ### check for existence of php file first
-<?php if ($phpfpm_mode == 'port'): ?>
+<?php if ($satellite_mode == 'boa'): ?>
+ fastcgi_pass unix:/var/run/www53.fpm.socket;
+<?php elseif ($phpfpm_mode == 'port'): ?>
fastcgi_pass 127.0.0.1:9000;
<?php else: ?>
fastcgi_pass unix:/var/run/php5-fpm.sock;
@@ -1159,7 +1186,9 @@ location @allowupdate {
keepalive_requests 0;
access_log off;
try_files $uri =404; ### check for existence of php file first
-<?php if ($phpfpm_mode == 'port'): ?>
+<?php if ($satellite_mode == 'boa'): ?>
+ fastcgi_pass unix:/var/run/www53.fpm.socket;
+<?php elseif ($phpfpm_mode == 'port'): ?>
fastcgi_pass 127.0.0.1:9000;
<?php else: ?>
fastcgi_pass unix:/var/run/php5-fpm.sock;