So i am trying to do a routing to 3 differents containers based on the request using docker and Nginx. The containers have the same IP and different ports. here is the Nginx configuration :
upstream helpdesk{
server 10.10.10.20:8089;
}
upstream dsi_helpdesk{
server 10.10.10.20:8088;
}
upstream drh_helpdesk{
server 10.10.10.20:8090;
}
server {
listen 80;
server_name myticket.grgsh.com;
location / {
proxy_set_header Host $host;
proxy_pass http://helpdesk;
}
location /dsi {
proxy_set_header Host $host;
proxy_pass http://dsi_helpdesk;
}
location /drh {
proxy_set_header Host $host;
proxy_pass http://drh_helpdesk;
}
}
when i navigate to myticket.grgsh.com the server redirect me to the upstream helpdesk but when i navigate to myticket.grgsh.com/dsi or myticket.grgsh.com/drh i get the error :
Not Found The requested URL was not found on this server.
Can anyone help resolve this problem ? Thanks.