This is a discussion on Something I still dont get about VirtualHosts within the Apache Web Server forums, part of the Web Server and Related Forums category; Hey everybody, ok this problem has been bothering me for some time now. I'm hosting a website at home ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hey everybody,
ok this problem has been bothering me for some time now. I'm hosting a website at home using a custom dns from dyndns.org. Now i have dns records for both www.myhostname.com and rasiel.myhostname.com to both point to my ip address. What i would like to have is that apache would serve my website only to www.myhostname.com and not to rasiel.myhostname.com So here's my question: how do I configure my 'main' server to not be bound to anything, and to only use my virtualhosts to serve the appropriate websites to the appropriate addresses? For the moment i have my main ServerName set to www.myhostname.com and a virtual host set to the same servername, but even when accessing my website with rasiel.myhostname.com i get to that website, the only sollution i have found till now is to add a second virtualhost with servername rasiel.myhostname.com and to point it to a documentroot that will redirect it to www.myhostname.com, but i'm sure there must be a cleaner sollution to this problem, no? Hope what i said is more or less clear and thanks in advance TheNavigator |