diff options
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/usr_local_etc_nginx_nginx.conf.j2 | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/templates/usr_local_etc_nginx_nginx.conf.j2 b/templates/usr_local_etc_nginx_nginx.conf.j2 new file mode 100644 index 0000000..f81a82c --- /dev/null +++ b/templates/usr_local_etc_nginx_nginx.conf.j2 @@ -0,0 +1,37 @@ +worker_processes auto; + +events { + worker_connections 1024; +} + +http { + include mime.types; + default_type application/octet-stream; + + sendfile on; + keepalive_timeout 65; + + server { + listen 80 default_server; + server_name _; + + location / { + return 404; + } + } + + {% for jail in jails -%} + server { + listen 80; + server_name {{ jail.name }}.local.jan.systems; + + location / { + proxy_pass http://{{ jail.ip }}; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + } + {% endfor %} +} |
