__maison/vhost/vhost_tmpl_apache2

39 lines
1.2 KiB
Plaintext
Raw Normal View History

2018-11-27 16:43:31 +01:00
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName %domain?
ServerAlias www.%domain? %domain?
DocumentRoot /home/%user?/html/%domain?
<Directory /home/%user?/html/%domain?>
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
ErrorLog /home/%user?/logs/%domain?/error.log
CustomLog /home/%user?/logs/%domain?/access.log combined
2018-11-29 21:33:36 +01:00
RewriteEngine on
RewriteCond %{SERVER_NAME} =%domain?
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
2018-11-27 16:43:31 +01:00
</VirtualHost>
<VirtualHost *:443>
ServerName %domain?
ServerAlias www.%domain? %domain?
DocumentRoot /home/%user?/html/%domain?
2018-11-29 21:33:36 +01:00
<Directory /home/%user?/html/%domain?>
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
2018-11-27 16:43:31 +01:00
ErrorLog /home/%user?/logs/%domain?/error.log
CustomLog /home/%user?/logs/%domain?/access.log combined
2018-11-29 21:33:36 +01:00
2018-11-27 16:43:31 +01:00
SSLEngine on
2018-11-29 21:33:36 +01:00
SSLCertificateFile /etc/letsencrypt/live/%domain?/fullchain.pem
2018-11-27 16:43:31 +01:00
SSLCertificateKeyFile /etc/letsencrypt/live/%domain?/privkey.pem
2018-11-29 22:29:38 +01:00
Include /etc/letsencrypt/options-ssl-apache.conf
2018-11-27 16:43:31 +01:00
</VirtualHost>