Wordpress nginx redirect loop

后端 未结 5 545
旧巷少年郎
旧巷少年郎 2020-12-15 09:13

So, yesterday I had a question how to install the wordpress in the \"/root\" directory. I wasn\'t very successful in that one and I forgo\'ed on that one.

So, right

5条回答
  •  情深已故
    2020-12-15 09:49

    I had a similar problem using Nginx as a reverse proxy for Apache.

    After a few hours I found out it was caused by the $_SERVER["REQUEST_URI"] being set to index.php by Nginx instead of the actual url and Wordpress was trying to remove index.php by redirecting to the url without index.php in wp-includes/canonical.php.

    The solution for me is using something like this,

    proxy_pass http://111.111.111.111:8080$request_uri;
    

    So adding the $request_uri fixed it.

提交回复
热议问题