Created
January 7, 2015 13:35
-
-
Save vinzent/f4b39419254529d75936 to your computer and use it in GitHub Desktop.
apache http https redirect vhost conf
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
<VirtualHost *:80> | |
ServerName phabricator.my.domain | |
## Vhost docroot | |
DocumentRoot "/opt/phacility/phabricator/webroot" | |
<Directory "/opt/phacility/phabricator/webroot"> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride None | |
Order allow,deny | |
Allow from all | |
</Directory> | |
## Load additional static includes | |
## Logging | |
ErrorLog "/var/log/httpd/phabricator.my.domain_80_error.log" | |
ServerSignature Off | |
CustomLog "/var/log/httpd/phabricator.my.domain_80_access.log" combined | |
## Rewrite rules | |
RewriteEngine On | |
#Redirect HTTP to HTTPS | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment