leptos/projects/nginx-mpmc/nginx_linux.conf

39 lines
1013 B
Plaintext

events {
}
http {
# set aliases
upstream app_server {
server 127.0.0.1:3000;
}
upstream app_2_server {
server 127.0.0.1:3001;
}
upstream shared_server {
server 127.0.0.1:3002;
}
upstream shared_server_2 {
server 127.0.0.1:3003;
}
server {
listen 80;
#server_name _;
# /app2 will serve the client for app2, and any client can call the api by calling /app2/api
location /app2 {
proxy_pass http://app_2_server;
}
# /api_shared will call the server functions registered on shared_server
location /api_shared {
proxy_pass http://shared_server;
}
# /api_shared_2 will call the server functions registered on shared_server_2
location /api_shared2 {
proxy_pass http://shared_server_2;
}
# we will by default serve the client for app-1
location / {
proxy_pass http://app_server;
}
}
}