Virtual Host and 'Main' server conflict
Posted: 09. August 2006 01:06
Sorry if I'm posting something that's been answered before, I searched for it and found nothing that helped me out for what I'm doing. Ok so here's my problem I have a server running as a testing server for when I'm working on websites and what not. Right now I have a dynamic IP address so I'm using DynDNS's services. I have a a Virtual Host set up and it works when I type in the domain both from a WAN and LAN connection. I have my 'main' server set up (password protected and secure) so that I can view access logs and other useful debugging information that should be private. All of this works so far, now with DynDNS I have wildcards enabled (example: my-domain.com; www.my-domain.com; mail.my-domain.com) when using the wildcards I should be able to have sub domains (at least from what I understand, and that's the easiest way to explain it) I currently am not using the wildcards so I just now came across this problem when I tried using one. I created a second Virtual Host (design.my-domain.com) so it would still use the same domain as my first VH but it uses a wildcard and should point it to the directory specified in my second VH (if there's another way to set up Virtual Hosts and using wildcards let me know) anyways I found out when other wildcards are put in before the domain it points the user to my 'main' server. I also had to put my 'main' server into a Virtual Host to make it work correctly with my first Virtual Host if there's a better or proper way to do that please let me know. So to cut it short I need to know how to set up two virtual hosts with the same domain name but one with a wildcard (example: 1st VH - my-domain.com; 2nd VH - design.my-domain.com) and have the two working properly without it conflicting my 'main' server which should only be able to be accessed by entering the IP address and should never be able to be accessed when using my domain name... sorry it's so long just wanted to get as much detail in there as possible. Thanks in advance