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.

New contributor
Sumit Bhatiya is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
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. Nov 23 at 9:35
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

Sumit Bhatiya is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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