Skip to content

Instantly share code, notes, and snippets.

@calvez
Created November 21, 2017 12:54
Show Gist options
  • Save calvez/6e0c52f12908046c38717ded38ec6df7 to your computer and use it in GitHub Desktop.
Save calvez/6e0c52f12908046c38717ded38ec6df7 to your computer and use it in GitHub Desktop.
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin [email protected]
ServerName asztronauta.com
ServerAlias www.asztronauta.com
DocumentRoot /home/websites/web/asztronauta.com
<Directory />
AllowOverride All
</Directory>
<Directory /home/websites/web/asztronauta.com>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Require all granted
</Directory>
ErrorLog /var/log/apache2/asztronauta.com-error.log
LogLevel error
CustomLog /var/log/apache2/asztronauta.com-access.log combined
SSLCertificateFile /etc/letsencrypt/live/www.asztronauta.com-0001/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.asztronauta.com-0001/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /etc/letsencrypt/live/www.asztronauta.com-0001/chain.pem
</VirtualHost>
</IfModule>
~
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName asztronauta.com
ServerAlias www.asztronauta.com
DocumentRoot /home/websites/web/asztronauta.com
<Directory />
AllowOverride All
</Directory>
<Directory /home/websites/web/asztronauta.com>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Require all granted
</Directory>
ErrorLog /var/log/apache2/asztronauta.com-error.log
LogLevel error
CustomLog /var/log/apache2/asztronauta.com-access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.asztronauta.com [OR]
RewriteCond %{SERVER_NAME} =asztronauta.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment