salix/services/nginx/nginx.mst

38 lines
726 B
Plaintext
Raw Normal View History

worker_processes 1;
events {
worker_connections 1024;
}
http {
2018-02-03 21:53:02 +00:00
sendfile on;
gzip on;
default_type application/octet-stream;
resolver 127.0.0.1;
include /etc/nginx/mime.types;
server {
2018-06-12 12:38:27 +00:00
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
2018-11-29 10:56:12 +00:00
autoindex off;
root /usr/share/nginx/html;
{{#services}}
location ~ ^/{{name}}(?:/(.*))?$ {
2018-02-09 11:26:27 +00:00
proxy_pass http://{{name}}:{{defaultPort}}/$1$is_args$args;
}
{{/services}}
location ~ ^/static(?:/(.*))?$ {
alias /usr/share/nginx/html/$1;
autoindex on;
}
location ~ ^(?:/(.*))?$ {
proxy_pass http://{{defaultService}}:{{defaultPort}}/$1$is_args$args;
}
}
}