upstream name-container {
server ип контейнера:(порт какой надо пробросить);
}
server {
listen domen:(порт на который пробросить);
proxy_connect_timeout 3600s;
proxy_timeout 3600s;
proxy_pass name-container;
}
server {
listen 80;
server_name subdomain.example.com;
access_log /var/log/nginx/subdomain.example.com-access.log;
error_log /var/log/nginx/subdomain.example.com-error.log;
location / {
proxy_pass http://192.168.13.31:85;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
}