У меня два сайта развернуты с nginx / 1.16.1 + php7.3-fpm.
вот файлы конфигурации
сайт 1:
$cat web1.conf
upstream web1 {
server unix:/run/php/web1.sock;
}
server {
listen 80;
server_name web1.com www.web1.com;
return 301 https://$host$request_uri;
}
server {
server_name web1.com www.web1.com;
ssl_certificate web1/ssl.crt;
ssl_certificate_key web1/ssl.key;
include conf.d/ssl.conf;
include conf.d/security.conf;
include conf.d/general.conf;
index index.php;
root /home/user0001/web1;
location ~ \.php$ {
include conf.d/php_fastcgi.conf;
fastcgi_pass web1;
}
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
include conf.d/wp_security.conf;
}
сайт2
$cat web2.conf
upstream web2 {
server unix:/run/php/web2.sock;
}
server {
listen 80;
server_name web2.com www.web2.com;
return 301 https://$host$request_uri;
}
server {
server_name web2.com www.web2.com;
ssl_certificate web2/ssl.crt;
ssl_certificate_key web2/ssl.key;
include conf.d/ssl.conf;
include conf.d/security.conf;
include conf.d/general.conf;
index index.php;
root /home/user0001/web2;
location ~ \.php$ {
include conf.d/php_fastcgi.conf;
fastcgi_pass web2;
}
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
include conf.d/wp_security.conf;
}
wp_security.conf
$cat wp_security.conf
location /wp-admin {
allow xxx.x.xxx.xx/32;
deny all;
error_page 403 = @wp_admin_ban;
}
location /admin {
allow xxx.x.xxx.xx/32;
deny all;
error_page 403 = @wp_admin_ban;
}
location /wp-login.php {
allow xxx.x.xxx.xx/32;
deny all;
error_page 403 = @wp_admin_ban;
}
location @wp_admin_ban {
rewrite ^(.*) $scheme://$host permanent;
}
Я использовал 3G / 4G для тестирования:
Кто-нибудь знает почему? и как исправить эту проблему. Спасибо