0

I know that can be done with the hosts file and that it should be done with it but for some reason I'd really have to make Apache act this way.

The problem is: the hosts are already in the DNS which I can't modify at all but they lead to my network's web server.

I'd like to receive requests from that IP, and simply shoot them to another IP. Is there any way of doing so with Apache2?

Thanks a lot!

  • Your question is not well defined. Are you saying that there are DNS records out on the Internet which are not yours but which point to an IP address of yours? – ThatGraemeGuy Nov 3 '10 at 14:12
  • Not on the internet, the DNS server is in the same office but I don't have the rights to modify it. Thanks :) – Tommy B. Nov 3 '10 at 14:29
1

Sounds like you are looking for a reverse proxy. In the vhost config add:

 ProxyPass / http://foo.example.com/
 ProxyPassReverse / http://foo.example.com/

foo.example.com is where you want to "shoot" the requests.

  • Thanks! I did not knew about that. It isn't currently enabled on my server so I was wondering, do you think it'll mess something if I activate it? We are a lot of people working on the same server and I don't want to mess it all up :S Thanks again :) – Tommy B. Nov 4 '10 at 12:56
  • Yes, it will direct everybody to foo.example.com, not just you. – Mark Wagner Nov 4 '10 at 18:59

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.