salix/services/nginx/nginx.production.mst

37 lines
690 B
Plaintext

worker_processes 1;
events {
worker_connections 1024;
}
http {
sendfile on;
gzip on;
default_type application/octet-stream;
resolver 127.0.0.1;
include /etc/nginx/mime.types;
server {
listen 80;
server_name localhost;
autoindex off;
root /usr/share/nginx/html;
{{#services}}
location ~ ^/{{name}}(?:/(.*))?$ {
proxy_pass http://{{name}}:{{port}}/$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;
}
}
}