|
@@ -1,15 +1,20 @@ |
|
|
<VirtualHost *:443> |
|
|
|
|
|
|
|
|
<VirtualHost _default_:443> |
|
|
|
|
|
|
|
|
ErrorLog ${APACHE_LOG_DIR}/error.log |
|
|
ErrorLog ${APACHE_LOG_DIR}/error.log |
|
|
CustomLog ${APACHE_LOG_DIR}/access.log combined |
|
|
CustomLog ${APACHE_LOG_DIR}/access.log combined |
|
|
|
|
|
|
|
|
|
|
|
DocumentRoot /var/www/default/ |
|
|
|
|
|
<Directory "/var/www/default/"> |
|
|
|
|
|
Options -Indexes |
|
|
|
|
|
</Directory> |
|
|
|
|
|
|
|
|
SSLEngine on |
|
|
SSLEngine on |
|
|
SSLCertificateFile "/etc/ssl/certs/ssl-cert-snakeoil.pem" |
|
|
SSLCertificateFile "/etc/ssl/certs/ssl-cert-snakeoil.pem" |
|
|
SSLCertificateKeyFile "/etc/ssl/private/ssl-cert-snakeoil.key" |
|
|
SSLCertificateKeyFile "/etc/ssl/private/ssl-cert-snakeoil.key" |
|
|
|
|
|
|
|
|
</VirtualHost> |
|
|
</VirtualHost> |
|
|
|
|
|
|
|
|
<VirtualHost *:80> |
|
|
|
|
|
|
|
|
<VirtualHost _default_:80> |
|
|
|
|
|
|
|
|
ErrorLog ${APACHE_LOG_DIR}/error.log |
|
|
ErrorLog ${APACHE_LOG_DIR}/error.log |
|
|
CustomLog ${APACHE_LOG_DIR}/access.log combined |
|
|
CustomLog ${APACHE_LOG_DIR}/access.log combined |
|
@@ -19,10 +24,10 @@ |
|
|
Options -Indexes |
|
|
Options -Indexes |
|
|
</Directory> |
|
|
</Directory> |
|
|
|
|
|
|
|
|
#RewriteEngine On |
|
|
|
|
|
#RewriteCond %{REQUEST_FILENAME} !-f |
|
|
|
|
|
#RewriteCond %{REQUEST_FILENAME} !-d |
|
|
|
|
|
#RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] |
|
|
|
|
|
|
|
|
# redirect to https if file could not be found in /var/www/default/ |
|
|
|
|
|
RewriteEngine On |
|
|
|
|
|
RewriteRule ^\/\.well-known\/acme-challenge\/ - [L] |
|
|
|
|
|
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L] |
|
|
|
|
|
|
|
|
</VirtualHost> |
|
|
</VirtualHost> |
|
|
|
|
|
|
|
|