Skip to content

Instantly share code, notes, and snippets.

@vinzent
Created January 7, 2015 13:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vinzent/f4b39419254529d75936 to your computer and use it in GitHub Desktop.
Save vinzent/f4b39419254529d75936 to your computer and use it in GitHub Desktop.
apache http https redirect vhost conf
<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