added certbot section
This commit is contained in:
2
templates/certbot/get_cert.erb
Normal file
2
templates/certbot/get_cert.erb
Normal 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
|
||||
4
templates/certbot/unless_get_cert.erb
Normal file
4
templates/certbot/unless_get_cert.erb
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
<% if @ng_enable_certbot == true %>
|
||||
test -d /etc/letsencrypt/archive/<%= @ng_nagios_server %>
|
||||
<% end %>
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user