nginx/site: Include extra snippets to template
This commit is contained in:
parent
22470d8a49
commit
c2e6c0f59d
3 changed files with 12 additions and 29 deletions
|
@ -26,6 +26,7 @@ server {
|
|||
ssl_certificate {{ tls_certs }}/{{ site }}-fullchain.crt;
|
||||
ssl_certificate_key {{ tls_private }}/{{ site }}.key;
|
||||
|
||||
{% include "./{}.conf.j2".format(site) ignore missing %}
|
||||
{% if redirect is defined %}
|
||||
return 301 {{ redirect }};
|
||||
{% elif proxy is defined %}
|
||||
|
@ -41,7 +42,6 @@ server {
|
|||
{% else %}
|
||||
root /srv/web/{{ site }};
|
||||
{% endif %}
|
||||
include /etc/nginx/conf.d/{{ site }}/*.conf;
|
||||
}
|
||||
|
||||
server {
|
||||
|
|
11
roles/nginx/site/templates/www.foo.sh.conf.j2
Normal file
11
roles/nginx/site/templates/www.foo.sh.conf.j2
Normal file
|
@ -0,0 +1,11 @@
|
|||
location /collab/ {
|
||||
return 301 https://collab.foo.sh/collab/;
|
||||
}
|
||||
|
||||
location /roles/ {
|
||||
proxy_pass https://static02.home.foo.sh/roles/;
|
||||
}
|
||||
location /~ {
|
||||
proxy_pass https://static02.home.foo.sh/~;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue