为什么http请求会自动重定向到redhat上新安装的httpd服务器上的https?

时间:2013-10-25 10:52:10

标签: apache redirect

我有一个红帽linux服务器版本6.2并且刚安装了httpd服务器。在其上部署DJango应用程序后,我发现对服务器的http请求会自动重定向到https,如下所示。我加倍检查我的httpd.conf并且100%确定我没有配置任何端口,如443,并且没有安装mod_ssl(已安装但之后已删除)。

这听起来很奇怪,我花了很多时间,但没有运气。

>wget http://myserver
Connecting to xx.xx.xxx.xxx ....connected.
HTTP request sent, awaiting response... 301 MOVED PERMANTENTLY
Location: https://xx.xx.xxx.xxx/ [following]
connecting to xx.xx.xxx.xxx:443...failed: Connection refueds.

1 个答案:

答案 0 :(得分:0)

您的配置中是否有SSL auto-redirect

RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]