Created
July 28, 2015 10:57
-
-
Save gtrias/f49902025f44b30e0176 to your computer and use it in GitHub Desktop.
Apache redirect to HTTPS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NameVirtualHost *:80 | |
<VirtualHost *:80> | |
ServerName www.example.com | |
Redirect permanent / https://secure.example.com/ | |
</VirtualHost> | |
<VirtualHost _default_:443> | |
ServerName secure.example.com | |
DocumentRoot /usr/local/apache2/htdocs | |
SSLEngine On | |
# etc... | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment