Compare commits
No commits in common. "088242592ae6003b8001b46fe6fc4d82808ff740" and "c8a157ad49f9652be3d14707f7c6935e92678ab7" have entirely different histories.
088242592a
...
c8a157ad49
17
apache.cf
17
apache.cf
|
@ -142,18 +142,16 @@ files:
|
|||
create => "true",
|
||||
edit_template => "$(sys.workdir)/inputs/$(def.mfdomain)/templates/httpd.conf.mustache",
|
||||
template_method => "mustache",
|
||||
handle => "apache_main_cfg_crreated",
|
||||
classes => if_repaired(apache_changed);
|
||||
|
||||
services:
|
||||
"$(apache.service_name)"
|
||||
depends_on => {"apache_editrc","apache_vhost_dir_created","apache_www_dir_created","apache_main_cfg_crreated"},
|
||||
depends_on => {"apache_editrc","apache_vhost_dir_created"},
|
||||
service_policy => "start",
|
||||
handle => "apache_running";
|
||||
|
||||
"php_changed|apache_changed"::
|
||||
"$(apache.service_name)"
|
||||
depends_on => {"apache_vhost_dir_created","apache_www_dir_created","apache_main_cfg_crreated"},
|
||||
service_policy => "restart";
|
||||
}
|
||||
|
||||
|
@ -166,21 +164,12 @@ commands:
|
|||
|
||||
|
||||
bundle agent apache_vhost
|
||||
(site_param)
|
||||
(site)
|
||||
{
|
||||
classes:
|
||||
"delete" expression => $(site[disable]);
|
||||
"use_ssl" expression => $(site[ssl]);
|
||||
vars:
|
||||
"site_defaults" data => '
|
||||
{
|
||||
"aliases":[],
|
||||
}
|
||||
';
|
||||
|
||||
"site" data => mergedata(site_defaults,site_param);
|
||||
|
||||
|
||||
"cert_file" string => "$(certbot.certbot_dir)/live/$(site[domain])";
|
||||
|
||||
"template_file"
|
||||
|
@ -217,7 +206,7 @@ files:
|
|||
|
||||
methods:
|
||||
use_ssl::
|
||||
"any" usebundle => certbot_cert(@(site),"$(apache.default_html_dir)"), #,"$(site[domain])"),
|
||||
"any" usebundle => certbot_cert(@(site),"$(apache.default_html_dir)","$(site[domain])"),
|
||||
handle => "apache_ssl_created$(site[domain])";
|
||||
|
||||
|
||||
|
|
|
@ -42,13 +42,10 @@ packages:
|
|||
handle => "certbot_installed";
|
||||
}
|
||||
|
||||
bundle agent certbot_cert(site,webroot)
|
||||
bundle agent certbot_cert(site,webroot,domain)
|
||||
{
|
||||
|
||||
vars:
|
||||
|
||||
"domain" string => "$(site[domain])";
|
||||
|
||||
"site_json" string => storejson(@(site));
|
||||
"args" string => string_mustache(
|
||||
"-d {{domain}} {{#aliases}} -d {{.}} {{/aliases}}",
|
||||
|
@ -74,8 +71,7 @@ classes:
|
|||
or => {no_cert_file, certbot_repaired};
|
||||
|
||||
defaults:
|
||||
"webroot" string => "standalone";
|
||||
"domain" string => "$(site[domain])";
|
||||
"webroot" string => "standalone";
|
||||
|
||||
methods:
|
||||
"any" usebundle => install_certbot;
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
ServerAlias {{#vars.apache_vhost.site.aliases}}{{.}} {{/vars.apache_vhost.site.aliases}}
|
||||
ErrorLog "{{vars.apache.log_dir}}/{{vars.apache_vhost.site.domain}}-error.log"
|
||||
CustomLog "{{vars.apache.log_dir}}/{{vars.apache_vhost.site.domain}}-access.log" combined
|
||||
{{vars.apache_vhost.site.raw}}
|
||||
</VirtualHost>
|
||||
{{/vars.apache_vhost.site.ssl}}
|
||||
|
||||
|
@ -49,7 +48,6 @@
|
|||
RewriteEngine On
|
||||
Alias /.well-known/acme-challenge/ "{{vars.apache.default_html_dir}}/.well-known/acme-challenge/"
|
||||
RewriteRule "^/.well-known/acme-challenge/" - [L]
|
||||
{{vars.apache_vhost.site.raw}}
|
||||
</VirtualHost>
|
||||
{{/vars.apache_vhost.site.ssl}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue