Nginx locations with different nodes

I have the an aws node that is responsible to redirect traffic to the correct node (I am developing magento dev ambients in each sub node). I have something like:

“`nginx location /endpoint { set $upstream domain.com; include …;

proxy_pass http//domain.com/; 

} “`

This will redirect the requests that are made to the node via domain.com/endpoint to the endpoint node.

In that node I have nginx configured like:

nginx server { listen port; server_name _; set $MAGE_ROOT /var/www/html; include ...; }

If I go to the domain.com/endpoint I get greeted by the homepage, but if I click an item on the store basically the /endpoint is removed from the URL and nothing works, but if I manually add it to the URL I can seed the items just fine.

How can I maintain this URL?

Please note that I have https//domain.com/ as my base URL in Magento’s database because If I had https//domain.com/endpoint I was having the ERR_TOO_MANY_REDIRECTS error.

submitted by /u/FireFausto
[link] [comments]