0

I was trying to redirect a subdomain ie billings.example.net to 1.2.3.4/billing. Well, from my experience I could access the 1.2.3.4 server and create a vhost pointing that the incoming of billings.example.net should be redirected to the 1.2.3.4/billing address. But, unfortunately, I don't have the access to the 1.2.3.4 server so I need to do something else.
So what should I do now? How can I resolve this error?

2
  • What do you mean, you don't have access to 1.2.3.4? It's not accessible by http, from the client? Or from billings.example.net? Or do you mean you don't have admin access to configure it? Nov 1 '20 at 16:34
  • The server 1.2.3.4 is running well and this server is also accessible by HTTP. i meant by telling dont have access is that I dont have the ssh access to the server, if I had then I could easily create a virtual host configuration file and it would be easy for me to redirect to the specified address. now I only have the access to the billing.example.net so whatever type of a name or CNAME i could create is only applicable to the example.net domain. Nov 1 '20 at 16:42
1

I think you want this configuration in the VirtualHost definition for billings.example.net:

ProxyPass        / https://1.2.3.4/billing/
ProxyPassReverse / https://1.2.3.4/billing/

Then any requests to billings.example.net/* will be transparently forwarded to 1.2.3.4/billing/*. You don't need admin access to 1.2.3.4 to set this up.

3
  • Thank you for the answer, as you've instructed to configure the billing.example.net ** I must say that billing is a **subdomain of example.net so where exactly should I put the ProxyPass options. Should I put it on example.net configuration file or somewhere else? TIA Nov 1 '20 at 19:25
  • Thank You very much @Andrew Schulman it worked Nov 1 '20 at 20:00
  • Good. I clarified that the directives should go in the VirtualHost definition for billings.example.net. Nov 1 '20 at 22:49

Your Answer

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.