Page 1 of 1

Virtual hosts and main virthost problem

PostPosted: 16. July 2010 15:51
by jdbg
Hi,

I have the following problem - the virtual hosts, that I added show me the default virtual host instead of the respective directories that I have specified. My httd-vhosts.conf is the following:

NameVirtualHost *:80

<VirtualHost *:80>
ServerName jdbg.dyndns.ws
DocumentRoot "D:\www-default\localhost"
</VirtualHost>

<VirtualHost *:80>
ServerName jdbg1.dynalias.com
DocumentRoot "D:\www-default\jdbg1"
</VirtualHost>


My hosts file is:
127.0.0.1 localhost
127.0.0.1 jdbg.dyndns.ws
127.0.0.1 jdbg1.dynalias.com


When I open any of this vhosts locally it is fine. When I open it from the internet, via the domains above - it opens only the default vhost (i.e. jdbg.dyndns.ws)

Any ideas what I've done wrong?

Re: Virtual hosts and main virthost problem

PostPosted: 18. July 2010 16:53
by JonB

Re: Virtual hosts and main virthost problem

PostPosted: 19. July 2010 19:43
by jdbg
I already did look at this topic, but nothing is in there that I tried and worked :(
I don't have the vhosts nested in the primary vhost. I've point the A records of the DNS in the name server correctly.
Still only the default vhost opens when I try to open the other vhosts.

Please help!

Re: Virtual hosts and main virthost problem

PostPosted: 19. July 2010 20:58
by JonB
That dynalias.com + dyndns.ws entry could be construed as a workaround to avoid using the Pro or Custom service of DynDNS, and they may have engineered a solution for that - its just a thought. Try two DynDNS entries on the same primary domain instead.

Good Luck

Re: Virtual hosts and main virthost problem

PostPosted: 20. July 2010 13:01
by jdbg
10x JonB, but still doesn't work.

I tried it with another tld domain - pointed the A records to the IP in question and still nothing...

Tried with
1.jdbg.eu (the first vhost)
2.jdbg.eu (the second vhost)

Any ideas on what's wrong with it?

Re: Virtual hosts and main virthost problem

PostPosted: 20. July 2010 15:27
by JonB
:idea:
Are you using FireFox or IE?
If you are using FireFox, be sure to dump the browser cache after making any changes.

(its again - only a thought)

You might try looking through the Apache access log (and the error log also) to see what Apache reads as the GET requests, and the error log might point out a misconfiguration.

:shock: