Skip to content

Instantly share code, notes, and snippets.

@kferran
Last active November 3, 2017 00:05
Show Gist options
  • Save kferran/8ed2a2ec7becca4006d0b433496513b8 to your computer and use it in GitHub Desktop.
Save kferran/8ed2a2ec7becca4006d0b433496513b8 to your computer and use it in GitHub Desktop.
vhost bundle of ssl and regular
<VirtualHost *:443>
ServerAdmin admin@example.com
DocumentRoot /var/www/html
ServerName example.com
ServerAlias www.example.com
SSLEngine on
SSLCertificateFile /address/of/your/certificate.crt
SSLCertificateKeyFile /address/of/your/keyfile.key
SSLCACertificateFile /address/of/your/certificate_chain_file.crt
<Directory /var/www/html>
Options FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
Redirect permanent / https://www.example.com
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment