init cert + vhost
This commit is contained in:
commit
eeca41f4b1
5
certbot-apache2/certbot_install
Executable file
5
certbot-apache2/certbot_install
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
sudo add-apt-repository ppa:certbot/certbot
|
||||
sudo apt-get update
|
||||
sudo apt-get install python-certbot-apache
|
||||
27
vhost-apache2/vhost_tmpl
Normal file
27
vhost-apache2/vhost_tmpl
Normal file
@ -0,0 +1,27 @@
|
||||
<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
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:443>
|
||||
ServerName %domain?
|
||||
ServerAlias www.%domain? %domain?
|
||||
DocumentRoot /home/%user?/html/%domain?
|
||||
ErrorLog /home/%user?/logs/%domain?/error.log
|
||||
CustomLog /home/%user?/logs/%domain?/access.log combined
|
||||
SSLEngine on
|
||||
SSLCertificateFile /etc/letsencrypt/live/%domain?/cert.pem
|
||||
SSLCertificateKeyFile /etc/letsencrypt/live/%domain?/privkey.pem
|
||||
</VirtualHost>
|
||||
Loading…
x
Reference in New Issue
Block a user