added certbot section

This commit is contained in:
Arne Teuke
2017-07-21 15:33:05 +01:00
parent e160b3f919
commit 2543121aba
6 changed files with 77 additions and 3 deletions

View File

@@ -0,0 +1,2 @@
certbot certonly -t -n --agree-tos --webroot -w <%= @ng_certbot_cert_path %>/ -d <%= @ng_nagios_server %> --email <%= @ng_mail_user %>
touch /etc/httpd/conf.d/.cert_created

View File

@@ -0,0 +1,4 @@
#!/bin/bash
<% if @ng_enable_certbot == true %>
test -d /etc/letsencrypt/archive/<%= @ng_nagios_server %>
<% end %>

View File

@@ -1,4 +1,4 @@
<VirtualHost *:80>
<VirtualHost *:<%= @ng_http_port %>>
ServerAdmin root@localhost
DocumentRoot /var/www/html
ServerName www.<%= @ng_nagios_server %>
@@ -8,7 +8,7 @@
<% end -%>
<% if @ng_use_https != true -%>
Redirect permanent / http://<%= @ng_nagios_server %>/nagios
<% end %>
<% end -%>
<Directory />
AllowOverride All
</Directory>