Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

183
Views
Changing web app's base url into host's subdomain

I want to deploy some web applications on different ports on the same host, with nginx reverse proxy.

So my configuration file is like this;

server_name         foo.bar.com

location /app1/ {
    proxy_pass      http://127.0.0.1:5000/;
}

location /app2/ {
    proxy_pass      http://127.0.0.1:6000/;
}

...

They work mostly fine, but there's a problem with one app.

It's a nodejs application and it has some functions like location.href = "/baz" that change current session's url from http://foo.bar.com/app into http://foo.bar.com/baz and cause Not Found errors.

That application is quite complicated and not written by me, so modifying it is quite hard.

Is there any way to change the application's base url into http://foo.bar.com/ so that make it work as http://foo.bar.com/app/baz, not http://foo.bar.com/baz?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!