Проблема с перенаправлением на домашнюю страницу
Result
https://www.example.com
301 Moved Permanently
https://www.example.com/
301 Moved Permanently
https://www.example.com/
301 Moved Permanently
https://www.example.com/
>>> https://www.example.com
> --------------------------------------------
> 301 Moved Permanently
> --------------------------------------------
Status: 301 Moved Permanently
Code: 301
Date: Sun, 08 Mar 2020 17:12:27 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
Set-Cookie: PHPSESSID=nc8ae71cti111f4886i4n88c8g; path=/
X-Powered-By: PHP/7.4.2
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
X-Redirect-By: WordPress
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Location: https://www.example.com/
X-Varnish: 275505
Age: 0
Via: 1.1 varnish (Varnish/6.0)
CF-Cache-Status: DYNAMIC
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Alt-Svc: h3-27=":443"; ma=86400, h3-25=":443"; ma=86400, h3-24=":443"; ma=86400, h3-23=":443"; ma=86400
Server: cloudflare
CF-RAY: 570e2e5f387adfbb-FRA
>>> https://www.example.com/
> --------------------------------------------
> 301 Moved Permanently
> --------------------------------------------
Status: 301 Moved Permanently
Code: 301
Date: Sun, 08 Mar 2020 17:12:27 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
Set-Cookie: PHPSESSID=phieba6dvq78s19s6mnriqlkhi; path=/
X-Powered-By: PHP/7.4.2
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
X-Redirect-By: WordPress
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Location: https://www.example.com/
X-Varnish: 275511
Age: 0
Via: 1.1 varnish (Varnish/6.0)
CF-Cache-Status: DYNAMIC
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Alt-Svc: h3-27=":443"; ma=86400, h3-25=":443"; ma=86400, h3-24=":443"; ma=86400, h3-23=":443"; ma=86400
Server: cloudflare
CF-RAY: 570e2e625f301f15-FRA
Вот мой nginx conf, я использую его для ssl, так как у меня есть лак на порту 80 apache на порту 8080 и nginx для лицензирования на 443 ssl.
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 1024;
}
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
server {
listen 443 ssl;
server_name _;
index index.php index.html index.htm;
ssl_certificate /etc/letsencrypt/live/www.sitename.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/www.sitename.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:80;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header Host $host;
}
}
}
Моя домашняя страница WordPress в бесконечном цикле.
ERR_TOO_MANY_REDIRECTS
остальная часть веб-сайта выглядит нормально, у меня есть облачная вспышка, а также сервер имен и кеширование. (все файлы cookie испортились, я думаю, потому что я не могу войти в wp-admin)
Я проверял использование сайта http://www.redirect-checker.org/ и сообщает, что обычные страницы имеют примерно 4 перенаправления и домашнюю страницу 19 (бесконечный цикл)
Есть идеи, как исправить?