From deff7c87273b7fede2e2253bcf76cc8aa9ecb287 Mon Sep 17 00:00:00 2001 From: gauthiier Date: Thu, 29 Nov 2018 21:33:36 +0100 Subject: [PATCH] vhost file 443 --- vhost-apache2/vhost_tmpl | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/vhost-apache2/vhost_tmpl b/vhost-apache2/vhost_tmpl index c30aab2..430205d 100644 --- a/vhost-apache2/vhost_tmpl +++ b/vhost-apache2/vhost_tmpl @@ -12,16 +12,27 @@ ErrorLog /home/%user?/logs/%domain?/error.log CustomLog /home/%user?/logs/%domain?/access.log combined + + RewriteEngine on + RewriteCond %{SERVER_NAME} =%domain? + RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] ServerName %domain? ServerAlias www.%domain? %domain? DocumentRoot /home/%user?/html/%domain? + + + Options Indexes FollowSymLinks + AllowOverride all + Require all granted + + ErrorLog /home/%user?/logs/%domain?/error.log CustomLog /home/%user?/logs/%domain?/access.log combined + SSLEngine on - SSLCertificateFile /etc/letsencrypt/live/%domain?/cert.pem + SSLCertificateFile /etc/letsencrypt/live/%domain?/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/%domain?/privkey.pem - SSLCertificateChainFile /etc/letsencrypt/live/%domain?/fullchain.pem \ No newline at end of file