stream {
upstream admin_app_server {
server unix:/home/ubuntu/Project/admin.sock fail_timeout=0;
}
upstream api_app_server {
server unix:/home/ubuntu/Project/src/admin/rest_api.sock fail_timeout=0;
}
map_hash_bucket_size 128;
map $ssl_preread_server_name $upstream {
api.project.tech api_app_server;
admin.project.tech admin_app_server;
default other;
}
server {
listen 443;
proxy_pass $upstream;
proxy_protocol on;
ssl_preread on;
}
}