Skip to content

Instantly share code, notes, and snippets.

@jerronimo
Last active February 11, 2017 20:55
Show Gist options
  • Save jerronimo/ab74d20045267f662ef80e8d2d9d1e84 to your computer and use it in GitHub Desktop.
Save jerronimo/ab74d20045267f662ef80e8d2d9d1e84 to your computer and use it in GitHub Desktop.
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName offers.no
SSLEngine on
SSLProtocol all -SSLv2
SSLCertificateFile "/etc/letsencrypt/live/offers.no/fullchain.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/offers.no/privkey.pem"
DocumentRoot /var/offers/web
<Directory /var/offers/web>
# enable the .htaccess rewrites
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName www.offers.no
SSLEngine on
SSLProtocol all -SSLv2
SSLCertificateFile "/etc/letsencrypt/live/www.offers.no/fullchain.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/www.offers.no/privkey.pem"
RewriteEngine On
RewriteRule (.*) https://offers.no%{REQUEST_URI} [R=301]
</VirtualHost>
</IfModule>
<VirtualHost *:80>
ServerAlias offers.no
ServerName offers.no
RewriteEngine On
RewriteRule (.*) https://offers.no%{REQUEST_URI} [R=301]
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment