Просто создайте еще один апстрим указав другой сокет. И создайте еще один блок server.
http {
upstream server1 {
server unix:///home/.../server1.sock;
}
upstream server2 {
server unix:///home/.../server2.sock;
}
server {
listen 80;
server_name server1.ru;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
uwsgi_pass server1;
include /etc/nginx/uwsgi_params;
}
}
server {
listen 80;
server_name server2.ru;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
uwsgi_pass server2;
include /etc/nginx/uwsgi_params;
}
}
}