View Single Post
  #18  
Old 21st February 2007, 16:37
frgomes frgomes is offline
Junior Member
 
Join Date: Feb 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Try updating /etc/hosts

If you are behind a NAT/firewall, probably your webserver has a local IP address (probably 192.168.xxx.xxx) and your router/firewall is responsible for forwarding incoming requests to your webserver.

In this situation, you have a public IP address for your www.yourdomain.com but, in fact, Apache has to accept requests in your local interface instead of your public IP address (assigned to your router/firewall in fact).

Try something like this in your /etc/hosts:


Code:
127.0.0.1 localhost

# these lines MUST be kept otherwise Apache2 fail serving these addresses
192.168.1.2 subdomain11.yourdomain1.com
192.168.1.2 subdomain12.yourdomain1.com
192.168.1.2 subdomain13.yourdomain1.com
192.168.1.2 subdomain21.yourdomain2.com
192.168.1.2 subdomain22.yourdomain2.com
192.168.1.2 subdomain23.yourdomain2.com


# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Enjoy :-)
Reply With Quote