问题
Goal: I want all requests made to http://mydomain to be redirected to https://mydomain.
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?
回答1:
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>
You can configure your existing VirtualHost
for SSL.
来源:https://stackoverflow.com/questions/51818050/http-requests-redirected-to-https