WordPress Nginx重定向循环 [英] Wordpress nginx redirect loop

查看:96
本文介绍了WordPress Nginx重定向循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,昨天我有一个问题,如何在"/root"目录中安装wordpress.我在那件事上不是很成功,我放弃了那件事.

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.

因此,现在wordpress位于"/var/www/wordpress "文件夹下(因此它位于单独的文件夹下)(如果需要,我使用Ubuntu 12.04 LTS).

So, right now the wordpress is located under "/var/www/wordpress" (so it's under separate folder) folder (I use Ubuntu 12.04 LTS, if it matters).

我的问题是,在我配置完所有内容之后(一切都像超级按钮一样工作),我立即被重定向到管理面板页面.一切正常,直到我尝试访问博客的那一刻.

And my problem is that right after I had configured everything (everything was working like a charm there) I was redirected to the admin panel page. Everything was working fine up until the moment when I tried to visit the blog.

我的博客的URL地址是:"blog.mysite.com".这就是为什么我使用NGINX的原因,因为我在一台服务器上有两个不同的应用程序(和环境),我需要对其进行区分.

The URL address for my blog is: "blog.mysite.com". That is why I use NGINX, because I have two different applications (and environments) on one server and I need to distinguish between them.

因此,事实是:blog.mysite.com/wp-admin(/wp-login.php)完全正常,但是当我访问首页时: blog.mysite.com >,它总是告诉我有一个无限的重定向循环(根据nginx访问日志文件的301重定向).

So, the fact is: blog.mysite.com/wp-admin (/wp-login.php) is working totally OK, but when I visit the front page: blog.mysite.com, it keeps telling me that there is an endless redirect loop (301 redirect according to nginx access log file).

在管理面板中,我同时将"WordPress地址(URL)"和站点地址(URL)"设置为:" http://blog. mysite.com ".将其中任何一个修改为其他内容,例如:" http://blog.mysite.com/wordpress "根本没有帮助. !

In admin panel I have both "WordPress Address (URL)" and "Site address (URL)" set to: "http://blog.mysite.com". Modifying either of them to something else, like: "http://blog.mysite.com/wordpress" is not helping at all!

.htaccess"文件为空,但是我使用的是默认的永久链接,因此应该没有问题(但是,我不确定).

".htaccess" file is empty, but I'm using default permalinks, so should not be a problem (However, I'm not sure).

nginx和apache2根指令均指向"/var/www/wordpress". 静态文件(css,js)可以正常工作.

Both nginx and apache2 root directives are pointing to "/var/www/wordpress". Static files (css,js) are working, if it matters.

如何解决此问题?任何帮助深表感谢!

How can I fix this problem ? Any help is much appreciated!

提前谢谢!

推荐答案

最后,找到了解决方案:

Finally, found a solution:

http://www.violato.net/blog/php /88-wordpress-did-infinite-301-redirect-loop

希望这将帮助其他与我有相同问题的人.

Hope this will help others that have the same problem as I did.

谢谢大家.

这篇关于WordPress Nginx重定向循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆