mirror of
https://github.com/myvesta/vesta
synced 2025-07-06 04:51:54 -07:00
CRLF to LF for nginx-rate-.limit templates for WordPresd
This commit is contained in:
parent
5e525f8898
commit
803cde4c89
3 changed files with 276 additions and 276 deletions
|
@ -1,93 +1,93 @@
|
||||||
server {
|
server {
|
||||||
listen %ip%:%proxy_ssl_port% ssl http2;
|
listen %ip%:%proxy_ssl_port% ssl http2;
|
||||||
server_name %domain_idn% %alias_idn%;
|
server_name %domain_idn% %alias_idn%;
|
||||||
# ssl on;
|
# ssl on;
|
||||||
ssl_certificate %ssl_pem%;
|
ssl_certificate %ssl_pem%;
|
||||||
ssl_certificate_key %ssl_key%;
|
ssl_certificate_key %ssl_key%;
|
||||||
error_log /var/log/%web_system%/domains/%domain%.error.log error;
|
error_log /var/log/%web_system%/domains/%domain%.error.log error;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
error_page 418 = @wordfence_lh;
|
error_page 418 = @wordfence_lh;
|
||||||
error_page 419 = @wordfence_route;
|
error_page 419 = @wordfence_route;
|
||||||
error_page 420 = @wordfence_sync;
|
error_page 420 = @wordfence_sync;
|
||||||
|
|
||||||
if ($request_uri ~ "^/\?wordfence_lh") { return 418; }
|
if ($request_uri ~ "^/\?wordfence_lh") { return 418; }
|
||||||
if ($request_uri ~ "^/\?rest_route=%2Fwordfence") { return 419; }
|
if ($request_uri ~ "^/\?rest_route=%2Fwordfence") { return 419; }
|
||||||
if ($request_uri ~ "^/\?wordfence_syncAttackData") { return 420; }
|
if ($request_uri ~ "^/\?wordfence_syncAttackData") { return 420; }
|
||||||
|
|
||||||
limit_conn addr 5;
|
limit_conn addr 5;
|
||||||
limit_conn zone_site 15;
|
limit_conn zone_site 15;
|
||||||
limit_req zone=one burst=14 delay=7;
|
limit_req zone=one burst=14 delay=7;
|
||||||
proxy_pass https://%ip%:%web_ssl_port%;
|
proxy_pass https://%ip%:%web_ssl_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /wp-admin/ {
|
location /wp-admin/ {
|
||||||
limit_conn addr 24;
|
limit_conn addr 24;
|
||||||
limit_conn zone_site 30;
|
limit_conn zone_site 30;
|
||||||
limit_req zone=one burst=40 delay=7;
|
limit_req zone=one burst=40 delay=7;
|
||||||
proxy_pass https://%ip%:%web_ssl_port%;
|
proxy_pass https://%ip%:%web_ssl_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /wp-json/ {
|
location /wp-json/ {
|
||||||
limit_conn addr 8;
|
limit_conn addr 8;
|
||||||
limit_conn zone_site 15;
|
limit_conn zone_site 15;
|
||||||
limit_req zone=one burst=40 delay=7;
|
limit_req zone=one burst=40 delay=7;
|
||||||
proxy_pass https://%ip%:%web_ssl_port%;
|
proxy_pass https://%ip%:%web_ssl_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location @wordfence_lh {
|
location @wordfence_lh {
|
||||||
limit_conn addr 8;
|
limit_conn addr 8;
|
||||||
limit_conn zone_site 15;
|
limit_conn zone_site 15;
|
||||||
limit_req zone=wfone burst=120;
|
limit_req zone=wfone burst=120;
|
||||||
proxy_pass https://%ip%:%web_ssl_port%;
|
proxy_pass https://%ip%:%web_ssl_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location @wordfence_route {
|
location @wordfence_route {
|
||||||
limit_conn addr 8;
|
limit_conn addr 8;
|
||||||
limit_conn zone_site 15;
|
limit_conn zone_site 15;
|
||||||
limit_req zone=wfone burst=120;
|
limit_req zone=wfone burst=120;
|
||||||
proxy_pass https://%ip%:%web_ssl_port%;
|
proxy_pass https://%ip%:%web_ssl_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location @wordfence_sync {
|
location @wordfence_sync {
|
||||||
limit_conn addr 8;
|
limit_conn addr 8;
|
||||||
limit_conn zone_site 15;
|
limit_conn zone_site 15;
|
||||||
limit_req zone=wfone burst=120;
|
limit_req zone=wfone burst=120;
|
||||||
proxy_pass https://%ip%:%web_ssl_port%;
|
proxy_pass https://%ip%:%web_ssl_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /wp-json/wordfence/ {
|
location /wp-json/wordfence/ {
|
||||||
limit_conn addr 8;
|
limit_conn addr 8;
|
||||||
limit_conn zone_site 15;
|
limit_conn zone_site 15;
|
||||||
limit_req zone=wfone burst=120;
|
limit_req zone=wfone burst=120;
|
||||||
proxy_pass https://%ip%:%web_ssl_port%;
|
proxy_pass https://%ip%:%web_ssl_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* ^.+\.(%proxy_extentions%)$ {
|
location ~* ^.+\.(%proxy_extentions%)$ {
|
||||||
root %sdocroot%;
|
root %sdocroot%;
|
||||||
access_log /var/log/%web_system%/domains/%domain%.log combined;
|
access_log /var/log/%web_system%/domains/%domain%.log combined;
|
||||||
access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
|
access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
|
||||||
expires max;
|
expires max;
|
||||||
# try_files $uri @fallback;
|
# try_files $uri @fallback;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /error/ {
|
location /error/ {
|
||||||
alias %home%/%user%/web/%domain%/document_errors/;
|
alias %home%/%user%/web/%domain%/document_errors/;
|
||||||
}
|
}
|
||||||
|
|
||||||
location @fallback {
|
location @fallback {
|
||||||
proxy_pass https://%ip%:%web_ssl_port%;
|
proxy_pass https://%ip%:%web_ssl_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ /\.ht {return 404;}
|
location ~ /\.ht {return 404;}
|
||||||
location ~ /\.env {return 404;}
|
location ~ /\.env {return 404;}
|
||||||
location ~ /\.svn/ {return 404;}
|
location ~ /\.svn/ {return 404;}
|
||||||
location ~ /\.git/ {return 404;}
|
location ~ /\.git/ {return 404;}
|
||||||
location ~ /\.hg/ {return 404;}
|
location ~ /\.hg/ {return 404;}
|
||||||
location ~ /\.bzr/ {return 404;}
|
location ~ /\.bzr/ {return 404;}
|
||||||
|
|
||||||
disable_symlinks if_not_owner from=%docroot%;
|
disable_symlinks if_not_owner from=%docroot%;
|
||||||
|
|
||||||
include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
|
include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
|
||||||
include %home%/%user%/conf/web/s%proxy_system%.%domain%.conf*;
|
include %home%/%user%/conf/web/s%proxy_system%.%domain%.conf*;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,93 +1,93 @@
|
||||||
server {
|
server {
|
||||||
listen %ip%:%proxy_ssl_port% ssl http2;
|
listen %ip%:%proxy_ssl_port% ssl http2;
|
||||||
server_name %domain_idn% %alias_idn%;
|
server_name %domain_idn% %alias_idn%;
|
||||||
# ssl on;
|
# ssl on;
|
||||||
ssl_certificate %ssl_pem%;
|
ssl_certificate %ssl_pem%;
|
||||||
ssl_certificate_key %ssl_key%;
|
ssl_certificate_key %ssl_key%;
|
||||||
error_log /var/log/%web_system%/domains/%domain%.error.log error;
|
error_log /var/log/%web_system%/domains/%domain%.error.log error;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
error_page 418 = @wordfence_lh;
|
error_page 418 = @wordfence_lh;
|
||||||
error_page 419 = @wordfence_route;
|
error_page 419 = @wordfence_route;
|
||||||
error_page 420 = @wordfence_sync;
|
error_page 420 = @wordfence_sync;
|
||||||
|
|
||||||
if ($request_uri ~ "^/\?wordfence_lh") { return 418; }
|
if ($request_uri ~ "^/\?wordfence_lh") { return 418; }
|
||||||
if ($request_uri ~ "^/\?rest_route=%2Fwordfence") { return 419; }
|
if ($request_uri ~ "^/\?rest_route=%2Fwordfence") { return 419; }
|
||||||
if ($request_uri ~ "^/\?wordfence_syncAttackData") { return 420; }
|
if ($request_uri ~ "^/\?wordfence_syncAttackData") { return 420; }
|
||||||
|
|
||||||
limit_conn addr 5;
|
limit_conn addr 5;
|
||||||
limit_conn zone_site 15;
|
limit_conn zone_site 15;
|
||||||
limit_req zone=one burst=14 delay=7;
|
limit_req zone=one burst=14 delay=7;
|
||||||
proxy_pass https://%ip%:%web_ssl_port%;
|
proxy_pass https://%ip%:%web_ssl_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /wp-admin/ {
|
location /wp-admin/ {
|
||||||
limit_conn addr 24;
|
limit_conn addr 24;
|
||||||
limit_conn zone_site 30;
|
limit_conn zone_site 30;
|
||||||
limit_req zone=one burst=40 delay=7;
|
limit_req zone=one burst=40 delay=7;
|
||||||
proxy_pass https://%ip%:%web_ssl_port%;
|
proxy_pass https://%ip%:%web_ssl_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /wp-json/ {
|
location /wp-json/ {
|
||||||
limit_conn addr 8;
|
limit_conn addr 8;
|
||||||
limit_conn zone_site 15;
|
limit_conn zone_site 15;
|
||||||
limit_req zone=one burst=40 delay=7;
|
limit_req zone=one burst=40 delay=7;
|
||||||
proxy_pass https://%ip%:%web_ssl_port%;
|
proxy_pass https://%ip%:%web_ssl_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location @wordfence_lh {
|
location @wordfence_lh {
|
||||||
limit_conn addr 8;
|
limit_conn addr 8;
|
||||||
limit_conn zone_site 15;
|
limit_conn zone_site 15;
|
||||||
limit_req zone=wfone burst=120;
|
limit_req zone=wfone burst=120;
|
||||||
proxy_pass https://%ip%:%web_ssl_port%;
|
proxy_pass https://%ip%:%web_ssl_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location @wordfence_route {
|
location @wordfence_route {
|
||||||
limit_conn addr 8;
|
limit_conn addr 8;
|
||||||
limit_conn zone_site 15;
|
limit_conn zone_site 15;
|
||||||
limit_req zone=wfone burst=120;
|
limit_req zone=wfone burst=120;
|
||||||
proxy_pass https://%ip%:%web_ssl_port%;
|
proxy_pass https://%ip%:%web_ssl_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location @wordfence_sync {
|
location @wordfence_sync {
|
||||||
limit_conn addr 8;
|
limit_conn addr 8;
|
||||||
limit_conn zone_site 15;
|
limit_conn zone_site 15;
|
||||||
limit_req zone=wfone burst=120;
|
limit_req zone=wfone burst=120;
|
||||||
proxy_pass https://%ip%:%web_ssl_port%;
|
proxy_pass https://%ip%:%web_ssl_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /wp-json/wordfence/ {
|
location /wp-json/wordfence/ {
|
||||||
limit_conn addr 8;
|
limit_conn addr 8;
|
||||||
limit_conn zone_site 15;
|
limit_conn zone_site 15;
|
||||||
limit_req zone=wfone burst=120;
|
limit_req zone=wfone burst=120;
|
||||||
proxy_pass https://%ip%:%web_ssl_port%;
|
proxy_pass https://%ip%:%web_ssl_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* ^.+\.(%proxy_extentions%)$ {
|
location ~* ^.+\.(%proxy_extentions%)$ {
|
||||||
root %sdocroot%;
|
root %sdocroot%;
|
||||||
access_log /var/log/%web_system%/domains/%domain%.log combined;
|
access_log /var/log/%web_system%/domains/%domain%.log combined;
|
||||||
access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
|
access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
|
||||||
expires max;
|
expires max;
|
||||||
# try_files $uri @fallback;
|
# try_files $uri @fallback;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /error/ {
|
location /error/ {
|
||||||
alias %home%/%user%/web/%domain%/document_errors/;
|
alias %home%/%user%/web/%domain%/document_errors/;
|
||||||
}
|
}
|
||||||
|
|
||||||
location @fallback {
|
location @fallback {
|
||||||
proxy_pass https://%ip%:%web_ssl_port%;
|
proxy_pass https://%ip%:%web_ssl_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ /\.ht {return 404;}
|
location ~ /\.ht {return 404;}
|
||||||
location ~ /\.env {return 404;}
|
location ~ /\.env {return 404;}
|
||||||
location ~ /\.svn/ {return 404;}
|
location ~ /\.svn/ {return 404;}
|
||||||
location ~ /\.git/ {return 404;}
|
location ~ /\.git/ {return 404;}
|
||||||
location ~ /\.hg/ {return 404;}
|
location ~ /\.hg/ {return 404;}
|
||||||
location ~ /\.bzr/ {return 404;}
|
location ~ /\.bzr/ {return 404;}
|
||||||
|
|
||||||
disable_symlinks if_not_owner from=%docroot%;
|
disable_symlinks if_not_owner from=%docroot%;
|
||||||
|
|
||||||
include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
|
include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
|
||||||
include %home%/%user%/conf/web/s%proxy_system%.%domain%.conf*;
|
include %home%/%user%/conf/web/s%proxy_system%.%domain%.conf*;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,90 +1,90 @@
|
||||||
server {
|
server {
|
||||||
listen %ip%:%proxy_port%;
|
listen %ip%:%proxy_port%;
|
||||||
server_name %domain_idn% %alias_idn%;
|
server_name %domain_idn% %alias_idn%;
|
||||||
error_log /var/log/%web_system%/domains/%domain%.error.log error;
|
error_log /var/log/%web_system%/domains/%domain%.error.log error;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
error_page 418 = @wordfence_lh;
|
error_page 418 = @wordfence_lh;
|
||||||
error_page 419 = @wordfence_route;
|
error_page 419 = @wordfence_route;
|
||||||
error_page 420 = @wordfence_sync;
|
error_page 420 = @wordfence_sync;
|
||||||
|
|
||||||
if ($request_uri ~ "^/\?wordfence_lh") { return 418; }
|
if ($request_uri ~ "^/\?wordfence_lh") { return 418; }
|
||||||
if ($request_uri ~ "^/\?rest_route=%2Fwordfence") { return 419; }
|
if ($request_uri ~ "^/\?rest_route=%2Fwordfence") { return 419; }
|
||||||
if ($request_uri ~ "^/\?wordfence_syncAttackData") { return 420; }
|
if ($request_uri ~ "^/\?wordfence_syncAttackData") { return 420; }
|
||||||
|
|
||||||
limit_conn addr 5;
|
limit_conn addr 5;
|
||||||
limit_conn zone_site 15;
|
limit_conn zone_site 15;
|
||||||
limit_req zone=one burst=14 delay=7;
|
limit_req zone=one burst=14 delay=7;
|
||||||
proxy_pass http://%ip%:%web_port%;
|
proxy_pass http://%ip%:%web_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /wp-admin/ {
|
location /wp-admin/ {
|
||||||
limit_conn addr 24;
|
limit_conn addr 24;
|
||||||
limit_conn zone_site 30;
|
limit_conn zone_site 30;
|
||||||
limit_req zone=one burst=40 delay=7;
|
limit_req zone=one burst=40 delay=7;
|
||||||
proxy_pass http://%ip%:%web_port%;
|
proxy_pass http://%ip%:%web_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /wp-json/ {
|
location /wp-json/ {
|
||||||
limit_conn addr 8;
|
limit_conn addr 8;
|
||||||
limit_conn zone_site 15;
|
limit_conn zone_site 15;
|
||||||
limit_req zone=one burst=40 delay=7;
|
limit_req zone=one burst=40 delay=7;
|
||||||
proxy_pass http://%ip%:%web_port%;
|
proxy_pass http://%ip%:%web_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location @wordfence_lh {
|
location @wordfence_lh {
|
||||||
limit_conn addr 8;
|
limit_conn addr 8;
|
||||||
limit_conn zone_site 15;
|
limit_conn zone_site 15;
|
||||||
limit_req zone=wfone burst=120;
|
limit_req zone=wfone burst=120;
|
||||||
proxy_pass http://%ip%:%web_port%;
|
proxy_pass http://%ip%:%web_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location @wordfence_route {
|
location @wordfence_route {
|
||||||
limit_conn addr 8;
|
limit_conn addr 8;
|
||||||
limit_conn zone_site 15;
|
limit_conn zone_site 15;
|
||||||
limit_req zone=wfone burst=120;
|
limit_req zone=wfone burst=120;
|
||||||
proxy_pass http://%ip%:%web_port%;
|
proxy_pass http://%ip%:%web_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location @wordfence_sync {
|
location @wordfence_sync {
|
||||||
limit_conn addr 8;
|
limit_conn addr 8;
|
||||||
limit_conn zone_site 15;
|
limit_conn zone_site 15;
|
||||||
limit_req zone=wfone burst=120;
|
limit_req zone=wfone burst=120;
|
||||||
proxy_pass http://%ip%:%web_port%;
|
proxy_pass http://%ip%:%web_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /wp-json/wordfence/ {
|
location /wp-json/wordfence/ {
|
||||||
limit_conn addr 8;
|
limit_conn addr 8;
|
||||||
limit_conn zone_site 15;
|
limit_conn zone_site 15;
|
||||||
limit_req zone=wfone burst=120;
|
limit_req zone=wfone burst=120;
|
||||||
proxy_pass http://%ip%:%web_port%;
|
proxy_pass http://%ip%:%web_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* ^.+\.(%proxy_extentions%)$ {
|
location ~* ^.+\.(%proxy_extentions%)$ {
|
||||||
root %docroot%;
|
root %docroot%;
|
||||||
access_log /var/log/%web_system%/domains/%domain%.log combined;
|
access_log /var/log/%web_system%/domains/%domain%.log combined;
|
||||||
access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
|
access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
|
||||||
expires max;
|
expires max;
|
||||||
# try_files $uri @fallback;
|
# try_files $uri @fallback;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /error/ {
|
location /error/ {
|
||||||
alias %home%/%user%/web/%domain%/document_errors/;
|
alias %home%/%user%/web/%domain%/document_errors/;
|
||||||
}
|
}
|
||||||
|
|
||||||
location @fallback {
|
location @fallback {
|
||||||
proxy_pass http://%ip%:%web_port%;
|
proxy_pass http://%ip%:%web_port%;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ /\.ht {return 404;}
|
location ~ /\.ht {return 404;}
|
||||||
location ~ /\.env {return 404;}
|
location ~ /\.env {return 404;}
|
||||||
location ~ /\.svn/ {return 404;}
|
location ~ /\.svn/ {return 404;}
|
||||||
location ~ /\.git/ {return 404;}
|
location ~ /\.git/ {return 404;}
|
||||||
location ~ /\.hg/ {return 404;}
|
location ~ /\.hg/ {return 404;}
|
||||||
location ~ /\.bzr/ {return 404;}
|
location ~ /\.bzr/ {return 404;}
|
||||||
|
|
||||||
disable_symlinks if_not_owner from=%docroot%;
|
disable_symlinks if_not_owner from=%docroot%;
|
||||||
|
|
||||||
include %home%/%user%/conf/web/nginx.%domain%.conf*;
|
include %home%/%user%/conf/web/nginx.%domain%.conf*;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue