Http请求重定向到https [英] Http requests redirected to https

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

问题描述

目标:我希望将对 http://mydomain 的所有请求重定向到

Goal: I want all requests made to http://mydomain to be redirected to https://mydomain.

今天,我有一个Apache Web服务器,该服务器处理对 http://mydomain 发出的所有传入请求,并将它们重定向到 http://localhost:8080 (JBoss应用程序服务器).我在Apache配置中为我的虚拟主机使用proxypass.

Today I have an Apache web server which handles all incoming requests made to http://mydomain and redirects them to http://localhost:8080 (JBoss application server). I'm using proxypass for my virtual host in the Apache configuration.

要实现我的目标我需要做什么?

What do I need to do to achieve my goal?

推荐答案

Apache Foundation

The Apache Foundation recommended approach is to have a dummy VirtualHost on port 80 with:

<VirtualHost *:80>
    ServerName www.example.com
    Redirect "/" "https://www.example.com/"
</VirtualHost>

您可以为SSL配置现有的VirtualHost.

You can configure your existing VirtualHost for SSL.

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

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