From ef3cf38c947ac4c337b4d21967dbf24117a282ac Mon Sep 17 00:00:00 2001 From: Sheppy Date: Wed, 21 Dec 2022 13:49:13 +0100 Subject: [PATCH] feat: nginx jinja templates --- templates/.nginx_stream_block.conf.j2.swp | Bin 0 -> 12288 bytes templates/nginx_server_block.conf.j2 | 15 +++++++++++++++ templates/nginx_stream_block.conf.j2 | 10 ++++++++++ 3 files changed, 25 insertions(+) create mode 100644 templates/.nginx_stream_block.conf.j2.swp create mode 100644 templates/nginx_server_block.conf.j2 create mode 100644 templates/nginx_stream_block.conf.j2 diff --git a/templates/.nginx_stream_block.conf.j2.swp b/templates/.nginx_stream_block.conf.j2.swp new file mode 100644 index 0000000000000000000000000000000000000000..a69680688a950cfa25dc6dec49b03fa62826f936 GIT binary patch literal 12288 zcmeI&y-pl45C`x%=#YRYNYoB+CHDbMlzV}spd?DS^4*$a!>(=Y0fA1N(DN4eW{H#l z5;ZB4F}I*oic6bBe@i24?eTd1>sISw@BO<2^}4f1(q0f<-AqRx=_rwi7+qz<(v40!BWI5~ zA0OXuae2%_00IjIR%w5)-%BamTd&l{%fp4)n1lcXAOHafKmY;|fB*#kF9G%~`YcCU zYL2zi^sV3e<`EqPAOHafKmY;|fB*y_009U<00RG@fX<1gYee5A(*OUb@Bbg`L=O^Q zCB8^pOJow85{w2fW|xu&k#byH$k*j()dQ#m%7&hs#zHc+zC*jyIR zZ|il8YBEu*!`N`)Rb9W?i6)$zka-t)wrN>JHa6v@F}Vj{*s)}$l2Y$1_vs~4_q<2D gp3TKrrn%J3%?;@Bh})^+$W`gKy_6%GZLB8r3&*>WApigX literal 0 HcmV?d00001 diff --git a/templates/nginx_server_block.conf.j2 b/templates/nginx_server_block.conf.j2 new file mode 100644 index 0000000..94f93df --- /dev/null +++ b/templates/nginx_server_block.conf.j2 @@ -0,0 +1,15 @@ +server{ + + # {{ comment }} + + listen 443 ssl; + listen [::]:443 ssl; + + {% if servernames %} + server_name {% for s in servernames %} {{ s }} {% endfor %}; + {% endif %} + + include locations/acme-challenge.conf; + + proxy_pass http://{{ targetip }}:{{ targetport }}; +} diff --git a/templates/nginx_stream_block.conf.j2 b/templates/nginx_stream_block.conf.j2 new file mode 100644 index 0000000..b605509 --- /dev/null +++ b/templates/nginx_stream_block.conf.j2 @@ -0,0 +1,10 @@ +server { + + # {{ comment }} + + listen {{ portstring }} {% if udp %} udp {% endif %}{% if ssl %} ssl {% endif %}; + proxy_pass {{ targetip }}:$server_port; + {% if transparent %} proxy_bind $remote_addr transparent; {% endif } + proxy_timeout 10s; + proxy_responses 1; +}