From eeca41f4b12cd5f0692d0eca102a9fe01632a338 Mon Sep 17 00:00:00 2001 From: gauthiier Date: Tue, 27 Nov 2018 16:43:31 +0100 Subject: [PATCH] init cert + vhost --- certbot-apache2/certbot_install | 5 +++++ vhost-apache2/vhost_tmpl | 27 +++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100755 certbot-apache2/certbot_install create mode 100644 vhost-apache2/vhost_tmpl diff --git a/certbot-apache2/certbot_install b/certbot-apache2/certbot_install new file mode 100755 index 0000000..b5f1442 --- /dev/null +++ b/certbot-apache2/certbot_install @@ -0,0 +1,5 @@ +#!/bin/sh + +sudo add-apt-repository ppa:certbot/certbot +sudo apt-get update +sudo apt-get install python-certbot-apache \ No newline at end of file diff --git a/vhost-apache2/vhost_tmpl b/vhost-apache2/vhost_tmpl new file mode 100644 index 0000000..01562c3 --- /dev/null +++ b/vhost-apache2/vhost_tmpl @@ -0,0 +1,27 @@ + + ServerAdmin webmaster@localhost + 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 + + + + + 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 + \ No newline at end of file