25 lines
409 B
Nginx Configuration File
25 lines
409 B
Nginx Configuration File
|
|
upstream back {
|
|
server back_1:3000;
|
|
server back_2:3000;
|
|
}
|
|
server {
|
|
listen 80 default_server;
|
|
listen [::]:80 default_server;
|
|
server_name _;
|
|
autoindex off;
|
|
|
|
root /salix/dist;
|
|
error_page 404 = @notfound;
|
|
|
|
location @notfound {
|
|
return 302 /;
|
|
}
|
|
location ~ ^(/[a-zA-Z0-9_-]+)?/(?<path>api(/.*)?)$ {
|
|
proxy_pass http://back/$path$is_args$args;
|
|
}
|
|
location / {
|
|
autoindex on;
|
|
}
|
|
}
|