Score:0

nginx reverse proxy on docker - setup custom ip for each domain

cv flag

I have nginx proxy reverse on docker. On the host server I have service failover ip. I want to set each domain on nginx custom IP, because at the moment all domains are using the main IP of my server.

How can I do that?

Can someone please help with the same. Below is my code

Score:0
us flag

As stated in nginx documentation, you add the IP address to the listen directive:

listen 127.0.0.1:443 ssl http2;

tells nginx to bind that virtual host to the localhost IP address port 443. If that hostname is reached via some other IP address, then nginx will route the request to the default virtual host.

zndbrgboz avatar
cv flag
I using proxy reverse on docker. My default.conf for domains look like: location / { proxy_pass http://domain.domain.us; auth_basic "Restricted Content"; auth_basic_user_file /etc/nginx/.m-htpasswd; } I should add in location / {...} set_real_ip_from ip.ip.ip/32; ?
us flag
Is this a new question? If yes, please open it as a new question. If it is additional information for this question, please edit the question and add information there.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.