0

I have a container with nginx (reverse proxy) and currently I have this configuration for when the user enters the following url (http://panels-cliente1.company.com) the page loads:

upstream panels-cliente1.company.com {
                                
                        server 172.20.1.100:3000;
}
server {
        server_name panels-cliente1.company.com;
        listen 443 ssl http2 ;
        access_log /var/log/nginx/access.log vhost;

        #Limite de subida de ficheros en Nginx
        client_max_body_size 50M;
        ssl_session_timeout 5m;
        ssl_session_cache shared:SSL:50m;
        ssl_session_tickets off;
        ssl_certificate /etc/nginx/certs/cert.crt;
        ssl_certificate_key /etc/nginx/certs/cert.key;
        add_header Strict-Transport-Security "max-age=31536000" always;
        location / {
                proxy_pass http://panels-cliente1.company.com;
        }
}

but I would like to see how to add another url to enter the same container, I mean having:

http://panels-cliente1.company.com

http://panels-cliente1.company.com

and with both links enter the server and when client1 is browsing it always sees "client1" and the same for client2, always in the url "client2" appears

I try adding in the server_name and in the upstream the 2 urls , but I'm not sure what to add in the location

Can I do something like what i describe?

Amila Senadheera
  • 12,229
  • 15
  • 27
  • 43
  • please fix the clients URIs, also this looks like a multitenant implementation right ? – jmvcollaborator Feb 18 '23 at 05:44
  • hi... What do I correct about the URLs? And of course, several clients must enter the same server, but through different urls. For the moment what I did was replicate all that piece of code but only changing the url. – Sebastian Pacheco Feb 20 '23 at 12:32

0 Answers0