You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.0 KiB

# worker_processes 1;
daemon off;
user {{ service.user }};
pid {{ service.root }}/pid;
worker_rlimit_nofile 1024;
events {
worker_connections 800;
}
http {
error_log {{ service.root }}/error.log warn;
access_log {{ service.root }}/access.log;
include /etc/nginx/mime.types;
default_type application/octet-stream;
index index.html index.htm index.xhtml;
fastcgi_param HTTP_PROXY "";
keepalive_timeout 65;
server_tokens off;
{% for user in consumers.www %}
server {
listen {{ service.ports.http }} ;
listen [::]:{{ service.ports.http }} ;
server_name {{ user.domain }} ;
location / {
root {{ user.root }} ;
}
}
{% endfor %}
{% for user in consumers.http %}
server {
listen {{ service.ports.http }};
listen [::]:{{ service.ports.http }};
server_name {{ user.domain }} *.{{ user.domain }};
location / {
proxy_set_header Host $host;
proxy_next_upstream_timeout 2s;
proxy_pass http://127.0.0.1:{{ user.ports.http }}/;
}
}
{% endfor %}
}