Nginx + WordPress ERR_TOO_MANY_REDIRECTS

摘要: Fresh installs a WordPress on Windows for development, and hits the ERR_TOO_MANY_REDIRECTS error message?

Fresh installs a WordPress on Windows for development, and hits the ERR_TOO_MANY_REDIRECTS error message?

Tested URL : http://localhost/index.php/wp-admin/install.php

Tested :

  1. PHP 7.1.10
  2. WordPress 4.8.3
  3. Nginx 1.12.1
  4. MySQL 5.7.17
  5. Windows 10
your-nginx\conf\nginx.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;

Solution

The missing of the default php page caused the “too many redirect” error messages, to fix this, add index index.php;

your-nginx\conf\nginx.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;

References

  1. Nginx + WordPress recipes

上一篇: ERROR 1045 (28000): Access denied for user root@localhost (using password: NO)
下一篇: PHP + Windows Call to undefined function mysql_connect()
 评论 ( What Do You Think )
名称
邮箱
网址
评论
验证
   
 

 


  • 微信公众号

  • 我的微信

站点声明:

1、一号门博客CMS,由Python, MySQL, Nginx, Wsgi 强力驱动

2、部分文章或者资源来源于互联网, 有时候很难判断是否侵权, 若有侵权, 请联系邮箱:summer@yihaomen.com, 同时欢迎大家注册用户,主动发布无版权争议的 文章/资源.

3、鄂ICP备14001754号-3, 鄂公网安备 42280202422812号