Skip to content

Commit

Permalink
move apache backend (passenger) to a dedicated hash
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Sep 4, 2023
1 parent 9c1ad36 commit f6603e7
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions puppet/modules/redmine/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,14 @@
include web::base

$docroot = "${app_root}/public"
$min_instances = 1
$start_timeout = 600
$priority = '05'

$apache_backend_config = {
passenger_app_root => $app_root,
passenger_min_instances => 1,
passenger_start_timeout => 600,
}

apache::vhost { $servername:
docroot => $docroot,
manage_docroot => false,
Expand All @@ -179,24 +183,22 @@
}

apache::vhost { "${servername}-https":
add_default_charset => 'UTF-8',
docroot => $docroot,
manage_docroot => false,
port => 443,
options => ['SymLinksIfOwnerMatch'],
passenger_app_root => $app_root,
passenger_min_instances => $min_instances,
passenger_start_timeout => $start_timeout,
priority => $priority,
servername => $servername,
ssl => true,
ssl_cert => "/etc/letsencrypt/live/${servername}/fullchain.pem",
ssl_chain => "/etc/letsencrypt/live/${servername}/chain.pem",
ssl_key => "/etc/letsencrypt/live/${servername}/privkey.pem",
headers => [
add_default_charset => 'UTF-8',
docroot => $docroot,
manage_docroot => false,
port => 443,
options => ['SymLinksIfOwnerMatch'],
priority => $priority,
servername => $servername,
ssl => true,
ssl_cert => "/etc/letsencrypt/live/${servername}/fullchain.pem",
ssl_chain => "/etc/letsencrypt/live/${servername}/chain.pem",
ssl_key => "/etc/letsencrypt/live/${servername}/privkey.pem",
headers => [
'set Strict-Transport-Security: max-age=15778800;',
],
require => [Letsencrypt::Certonly[$servername], Exec['install redmine']],
require => [Letsencrypt::Certonly[$servername], Exec['install redmine']],
* => $apache_backend_config,
}
}

Expand Down

0 comments on commit f6603e7

Please sign in to comment.