Hi,<\/p>\n
Here is what I am trying to do in nginx:<\/p>\n
location ^~ /bat { This works perfectly and I have no issues with it.<\/p>\n 10.10.10.10 is a different internal server than what mydomain.com<\/a> is served from.<\/p>\n Until we now have a URL mydomain.com/bathroom<\/a><\/p>\n That tries to call from the above location and I get a 404 error.<\/p>\n How can I write the above location directive to be an exact match only?<\/p>\n I tried = but that does not work.<\/p>","upvoteCount":5,"answerCount":1,"datePublished":"2023-03-27T17:51:06.000Z","author":{"@type":"Person","name":"fredgonzales","url":"https://community.spiceworks.com/u/fredgonzales"},"suggestedAnswer":[{"@type":"Answer","text":" Hi,<\/p>\n Here is what I am trying to do in nginx:<\/p>\n location ^~ /bat { This works perfectly and I have no issues with it.<\/p>\n 10.10.10.10 is a different internal server than what mydomain.com<\/a> is served from.<\/p>\n
\nproxy_set_header Host “10.10.10.10”;
\nproxy_pass http://10.10.10.10/<\/a> desired_url;
\nproxy_cookie_domain *.domain.com 10.10.10.10;
\n}<\/p>\n
\nproxy_set_header Host “10.10.10.10”;
\nproxy_pass http://10.10.10.10/<\/a> desired_url;
\nproxy_cookie_domain *.domain.com 10.10.10.10;
\n}<\/p>\n