Nginx + WordPress ERR_TOO_MANY_REDIRECTS
Fresh installiert ein WordPress unter Windows für die Entwicklung und trifft die FehlermeldungERR_TOO_MANY_REDIRECTS
?
Getestete URL:http://localhost/index.php/wp-admin/install.php
Geprüft :
-
PHP 7.1.10
-
WordPress 4.8.3
-
Nginx 1.12.1
-
MySQL 5.7.17
-
Windows 10
ginx.conf
upstream php { server 127.0.0.1:9999; } server { listen 80; server_name localhost; root www/wordpress; location / { try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { include fastcgi.conf; fastcgi_intercept_errors on; fastcgi_pass php; } location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires max; log_not_found off; } }
Lösung
Das Fehlen der Standard-PHP-Seite führte zu den Fehlermeldungen "Zu viele Weiterleitungen". Um dies zu beheben, fügen Sieindex index.php;
hinzu
ginx.conf
upstream php { server 127.0.0.1:9999; } server { listen 80; server_name localhost; root www/wordpress; # fixed wordpress install ERR_TOO_MANY_REDIRECTS index index.php; location / { try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { include fastcgi.conf; fastcgi_intercept_errors on; fastcgi_pass php; } location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires max; log_not_found off; } }