nginx: new template
parent
7fdccfa1b2
commit
f6f4d542ae
|
@ -21,10 +21,10 @@ http {
|
||||||
|
|
||||||
server_tokens off;
|
server_tokens off;
|
||||||
|
|
||||||
{% for user in consumers["www"] %}
|
{% for user in consumers.www %}
|
||||||
server {
|
server {
|
||||||
listen {{ port(service.id) }} ;
|
listen {{ service.ports.http }} ;
|
||||||
listen [::]:{{ port(service.id) }} ;
|
listen [::]:{{ service.ports.http }} ;
|
||||||
server_name {{ user.domain }} ;
|
server_name {{ user.domain }} ;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
@ -33,16 +33,16 @@ http {
|
||||||
}
|
}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% for user in consumers["http"] %}
|
{% for user in consumers.http %}
|
||||||
server {
|
server {
|
||||||
listen {{ port(service.id) }};
|
listen {{ service.ports.http }};
|
||||||
listen [::]:{{ port(service.id) }};
|
listen [::]:{{ service.ports.http }};
|
||||||
server_name {{ user.domain }} *.{{ user.domain }};
|
server_name {{ user.domain }} *.{{ user.domain }};
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_next_upstream_timeout 2s;
|
proxy_next_upstream_timeout 2s;
|
||||||
proxy_pass http://127.0.0.1:{{ port(user.id) }}/;
|
proxy_pass http://127.0.0.1:{{ user.ports.http }}/;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in New Issue