1

I have a public IP and some hostnames pointing to it, on this public IP server I have others intranet interfaces running apache virtual hosts servers, my question is how can I forward external requests to this interfaces?

On a simple apache virtual hosts running in the public IP machine I can easy do that editing /etc/hosts this way

127.0.0.1 mysite.com
127.0.0.1 blog.mysite.com

But by some motive it not work with intranet interfaces

172.17.0.1 mysite.com
172.17.0.2 blog.mysite.com
172.17.0.2 news.mysite.com

ps: A apache server is running on each IP

I simple get ERR_CONNECTION_REFUSED, if a ping it I get the server IP, so the public DNS are working

Can you help me?

deFreitas
  • 121
  • 5

1 Answers1

0

The solution

Ok hours later I found the answer, is very simple:

You need to have another apache instance or whatever like it running on port 80 for this case and create virtual hosts to resolve the hostnames to the intranet ips.

More explanation

If I have apache running in others intranet IPs they are not visible on public IP, if someone access myhost.com he will be pointed to 0.0.0.0:80 (public ip), so in this port you need to have some service that understand the request and forward it to the respective internal host, apache do that.

deFreitas
  • 121
  • 5