Skip to content

Commit

Permalink
Put headers and request headers before proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
quixoten committed Dec 22, 2015
1 parent cf84e97 commit 6b8aa3a
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions manifests/vhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,26 @@
}
}

# Template uses:
# - $headers
if $headers and ! empty($headers) {
concat::fragment { "${name}-header":
target => "${priority_real}${filename}.conf",
order => 140,
content => template('apache/vhost/_header.erb'),
}
}

# Template uses:
# - $request_headers
if $request_headers and ! empty($request_headers) {
concat::fragment { "${name}-requestheader":
target => "${priority_real}${filename}.conf",
order => 150,
content => template('apache/vhost/_requestheader.erb'),
}
}

# Template uses:
# - $proxy_dest
# - $proxy_pass
Expand All @@ -685,7 +705,7 @@
if $proxy_dest or $proxy_pass or $proxy_pass_match or $proxy_dest_match {
concat::fragment { "${name}-proxy":
target => "${priority_real}${filename}.conf",
order => 140,
order => 160,
content => template('apache/vhost/_proxy.erb'),
}
}
Expand All @@ -695,7 +715,7 @@
if $rack_base_uris {
concat::fragment { "${name}-rack":
target => "${priority_real}${filename}.conf",
order => 150,
order => 170,
content => template('apache/vhost/_rack.erb'),
}
}
Expand All @@ -705,7 +725,7 @@
if $passenger_base_uris {
concat::fragment { "${name}-passenger_uris":
target => "${priority_real}${filename}.conf",
order => 155,
order => 175,
content => template('apache/vhost/_passenger_base_uris.erb'),
}
}
Expand All @@ -726,7 +746,7 @@
if ($redirect_source and $redirect_dest) or ($redirectmatch_status and $redirectmatch_regexp and $redirectmatch_dest) {
concat::fragment { "${name}-redirect":
target => "${priority_real}${filename}.conf",
order => 160,
order => 180,
content => template('apache/vhost/_redirect.erb'),
}
}
Expand All @@ -740,7 +760,7 @@
if $rewrites or $rewrite_rule {
concat::fragment { "${name}-rewrite":
target => "${priority_real}${filename}.conf",
order => 170,
order => 190,
content => template('apache/vhost/_rewrite.erb'),
}
}
Expand All @@ -751,7 +771,7 @@
if ( $scriptalias or $scriptaliases != [] ) {
concat::fragment { "${name}-scriptalias":
target => "${priority_real}${filename}.conf",
order => 180,
order => 200,
content => template('apache/vhost/_scriptalias.erb'),
}
}
Expand All @@ -761,7 +781,7 @@
if $serveraliases and ! empty($serveraliases) {
concat::fragment { "${name}-serveralias":
target => "${priority_real}${filename}.conf",
order => 190,
order => 210,
content => template('apache/vhost/_serveralias.erb'),
}
}
Expand All @@ -772,7 +792,7 @@
if ($setenv and ! empty($setenv)) or ($setenvif and ! empty($setenvif)) {
concat::fragment { "${name}-setenv":
target => "${priority_real}${filename}.conf",
order => 200,
order => 220,
content => template('apache/vhost/_setenv.erb'),
}
}
Expand All @@ -798,7 +818,7 @@
if $ssl {
concat::fragment { "${name}-ssl":
target => "${priority_real}${filename}.conf",
order => 210,
order => 230,
content => template('apache/vhost/_ssl.erb'),
}
}
Expand All @@ -811,7 +831,7 @@
if $ssl_proxyengine {
concat::fragment { "${name}-sslproxy":
target => "${priority_real}${filename}.conf",
order => 210,
order => 230,
content => template('apache/vhost/_sslproxy.erb'),
}
}
Expand All @@ -827,7 +847,7 @@
if $auth_kerb {
concat::fragment { "${name}-auth_kerb":
target => "${priority_real}${filename}.conf",
order => 210,
order => 230,
content => template('apache/vhost/_auth_kerb.erb'),
}
}
Expand All @@ -839,7 +859,7 @@
if $suphp_engine == 'on' {
concat::fragment { "${name}-suphp":
target => "${priority_real}${filename}.conf",
order => 220,
order => 240,
content => template('apache/vhost/_suphp.erb'),
}
}
Expand All @@ -850,7 +870,7 @@
if ($php_values and ! empty($php_values)) or ($php_flags and ! empty($php_flags)) {
concat::fragment { "${name}-php":
target => "${priority_real}${filename}.conf",
order => 220,
order => 240,
content => template('apache/vhost/_php.erb'),
}
}
Expand All @@ -860,29 +880,9 @@
# - $php_admin_flags
if ($php_admin_values and ! empty($php_admin_values)) or ($php_admin_flags and ! empty($php_admin_flags)) {
concat::fragment { "${name}-php_admin":
target => "${priority_real}${filename}.conf",
order => 230,
content => template('apache/vhost/_php_admin.erb'),
}
}

# Template uses:
# - $headers
if $headers and ! empty($headers) {
concat::fragment { "${name}-header":
target => "${priority_real}${filename}.conf",
order => 240,
content => template('apache/vhost/_header.erb'),
}
}

# Template uses:
# - $request_headers
if $request_headers and ! empty($request_headers) {
concat::fragment { "${name}-requestheader":
target => "${priority_real}${filename}.conf",
order => 250,
content => template('apache/vhost/_requestheader.erb'),
content => template('apache/vhost/_php_admin.erb'),
}
}

Expand Down

0 comments on commit 6b8aa3a

Please sign in to comment.