summaryrefslogtreecommitdiff
path: root/sitemodules/profiles/templates/nginx_revproxy/virtual_host.nginx.epp
diff options
context:
space:
mode:
authorJan Dittberner <jandd@cacert.org>2020-06-06 13:02:41 +0200
committerJan Dittberner <jandd@cacert.org>2020-06-06 13:02:41 +0200
commit465329d7cda940325c020ea9393bed49ea19a321 (patch)
treebbf625ba356885172863f733c20b3aa7295521f6 /sitemodules/profiles/templates/nginx_revproxy/virtual_host.nginx.epp
parentd1f15371037d861f95f0b0f0b163294837dfb6c7 (diff)
downloadcacert-puppet-465329d7cda940325c020ea9393bed49ea19a321.tar.gz
cacert-puppet-465329d7cda940325c020ea9393bed49ea19a321.tar.xz
cacert-puppet-465329d7cda940325c020ea9393bed49ea19a321.zip
Add proxy headers for name based virtual hosting
Diffstat (limited to 'sitemodules/profiles/templates/nginx_revproxy/virtual_host.nginx.epp')
-rw-r--r--sitemodules/profiles/templates/nginx_revproxy/virtual_host.nginx.epp7
1 files changed, 6 insertions, 1 deletions
diff --git a/sitemodules/profiles/templates/nginx_revproxy/virtual_host.nginx.epp b/sitemodules/profiles/templates/nginx_revproxy/virtual_host.nginx.epp
index 87bdae7..38409cf 100644
--- a/sitemodules/profiles/templates/nginx_revproxy/virtual_host.nginx.epp
+++ b/sitemodules/profiles/templates/nginx_revproxy/virtual_host.nginx.epp
@@ -26,6 +26,11 @@ server {
<%= $custom_config -%>
location / {
- proxy_pass <%= $target %>;
+ proxy_pass <%= $target %>;
+ proxy_set_header X-Forwarded-Host $host:$server_port;
+ proxy_set_header X-Forwarded-Server $host;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}