2

We have Two servers : webserver (Server one) Server (IP: 198.51.100.44) Mobile server (Server Two) (IP: 203.0.113.88)

One Domain name : example.com

Once anyone opens https://example.com open the server one page. if anyone opens https://example.com/mob open the server two pages.

We have assigned to server one IP address to Domain A record & we have created a virtual host file server one.

please guide him on how to assign server two dir. the path this link, https://example.com/mob via virtual host or.htaccess.

1
  • 4
    Would you be wiling to switch from a subdirectory (example.com/mob) to a subdomain (mob.example.com)? The latter would be so much easier to set up in this situation. Commented Nov 23, 2021 at 9:35

1 Answer 1

1

You can't do what you ask the way you asked.

An IP address is associated with a domain, NOT A URL.

This means you either need to change example.com/mob to mob.example.com or use a reverse proxy to intercept and reroute requests (which means all traffic will flow via the reverse proxy). There are lots of different reverse proxy solutions depending on your use case)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.