diff --git a/global/overlay/etc/puppet/cosmos-rules.yaml b/global/overlay/etc/puppet/cosmos-rules.yaml index e38bcad..fcbe492 100644 --- a/global/overlay/etc/puppet/cosmos-rules.yaml +++ b/global/overlay/etc/puppet/cosmos-rules.yaml @@ -19,6 +19,7 @@ dns-rest-api1.sunet.se: dns: dns::knotdns: dns::apache2: + dnsapiport = '8443' sunet::certbot::acmed: sunet::baas2: nodename: 7B9DBFE1F4D1 diff --git a/global/overlay/etc/puppet/modules/dns/manifests/apache2.pp b/global/overlay/etc/puppet/modules/dns/manifests/apache2.pp index 3d41a74..13e4bf9 100644 --- a/global/overlay/etc/puppet/modules/dns/manifests/apache2.pp +++ b/global/overlay/etc/puppet/modules/dns/manifests/apache2.pp @@ -1,4 +1,6 @@ -class dns::apache2 { +class dns::apache2 ( + $dnsapiport = '8443', +){ package { ['apache2', 'libapache2-mod-qos', 'python3-certbot-apache']: ensure => installed, @@ -34,6 +36,6 @@ class dns::apache2 { rule => "add rule inet filter input tcp dport 80 counter accept comment \"allow-apache2-http\"" } sunet::nftables::rule { 'apache-https': - rule => "add rule inet filter input tcp dport 443 counter accept comment \"allow-apache2-https\"" + rule => "add rule inet filter input tcp dport $dnsapiport counter accept comment \"allow-apache2-https\"" } } diff --git a/global/overlay/etc/puppet/modules/dns/templates/apache2/dns-rest-api.conf.erb b/global/overlay/etc/puppet/modules/dns/templates/apache2/dns-rest-api.conf.erb index a1567e6..251d683 100644 --- a/global/overlay/etc/puppet/modules/dns/templates/apache2/dns-rest-api.conf.erb +++ b/global/overlay/etc/puppet/modules/dns/templates/apache2/dns-rest-api.conf.erb @@ -6,7 +6,7 @@ RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] - +> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined