Skip to content

Instantly share code, notes, and snippets.

@tchollingsworth
Forked from anonymous/000-default-le-ssl.conf
Last active June 28, 2017 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tchollingsworth/192d810d9456e30548135fe16ed00dd1 to your computer and use it in GitHub Desktop.
Save tchollingsworth/192d810d9456e30548135fe16ed00dd1 to your computer and use it in GitHub Desktop.
cleaned up config
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory /var/www/html/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLCertificateFile /etc/letsencrypt/live/arshift.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/arshift.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory /var/www/html/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName www.arshift.com
ServerSignature Off
RewriteEngine On
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
ErrorLog /var/log/apache2/redirect.error.log
LogLevel warn
SSLCertificateFile /etc/letsencrypt/live/arshift.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/arshift.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
<VirtualHost _default_:80>
ServerName www.arshift.com
ServerSignature Off
RewriteEngine On
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
ErrorLog /var/log/apache2/redirect.error.log
LogLevel warn
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment