summaryrefslogtreecommitdiff
path: root/sitemodules/profiles/templates/nginx_revproxy/virtual_host.nginx.epp
diff options
context:
space:
mode:
Diffstat (limited to 'sitemodules/profiles/templates/nginx_revproxy/virtual_host.nginx.epp')
-rw-r--r--sitemodules/profiles/templates/nginx_revproxy/virtual_host.nginx.epp31
1 files changed, 31 insertions, 0 deletions
diff --git a/sitemodules/profiles/templates/nginx_revproxy/virtual_host.nginx.epp b/sitemodules/profiles/templates/nginx_revproxy/virtual_host.nginx.epp
new file mode 100644
index 0000000..2173adf
--- /dev/null
+++ b/sitemodules/profiles/templates/nginx_revproxy/virtual_host.nginx.epp
@@ -0,0 +1,31 @@
+<%- | String $virtual_host,
+ String $target,
+ String $custom_config,
+| -%>
+# THIS FILE IS MANAGED BY PUPPET, MANUAL CHANGES WILL BE OVERWRITTEN AT THE
+# NEXT PUPPET RUN.
+
+server {
+ listen 80;
+ listen [::]:80;
+
+ listen 443 ssl;
+ listen [::]:443 ssl;
+
+ if ($https != "on") {
+ return 301 https://$host$uri;
+ }
+
+ ssl_certificate /etc/ssl/public/<%= $virtual_host %>.chain.pem;
+ ssl_certificate_key /etc/ssl/private/<%= $virtual_host %>.key.pem;
+
+ access_log /var/log/nginx/<%= $virtual_host %>.access.log;
+ error_log /var/log/nginx/<%= $virtual_host %>.error.log;
+
+ server_name <%= $virtual_hosts %>;
+ <%= $custom_config -%>
+
+ location / {
+ proxy_pass <%= $target %>;
+ }
+}