Koozali.org: home of the SME Server

virtualhost addresses issue

Bela

virtualhost addresses issue
« on: January 03, 2003, 08:53:38 PM »
I tried to set up some subdomains on my sme box where the primary domain is domain.com and a virtual domain is mydomain.com. When I set up new host such as www2 under the virtual domain it does not work. The website always comes up as the primary website and not the site configured under the virtual domain. I have a few test servers to try things on so I tried this on 5.0 5.12 and 5.5 and they all do the same thing.
Is there a way around it? Has anyone else had this problem and was able to fix it? Any help is appreciated.

Bela.

Tyrone C. Miles

Re: virtualhost addresses issue
« Reply #1 on: January 03, 2003, 09:57:20 PM »
Are you accessing this from outside the network or inside?

Bela

Re: virtualhost addresses issue
« Reply #2 on: January 03, 2003, 10:14:53 PM »
Actually it does not matter. I can be on the box and try to go to www2.mydomain.com and it will take me to the primary website instead of the site configured under the virtual domain.
The box is a standalone server with server only config running 5.12 with all official updates, but I have try this on other installs as well and I have the same results.

Tyrone C. Miles

Re: virtualhost addresses issue
« Reply #3 on: January 03, 2003, 10:35:38 PM »
The reason I asked is because if you are outside the network then the things in your V-Hosts list do not matter (Because machines outside the network will only go to what you have configured through your DNS provider).

Do you have more then one e-smith server on your network? Is this a Standalone or is this server used as a gateway also?

Bela

Re: virtualhost addresses issue
« Reply #4 on: January 03, 2003, 11:02:32 PM »
This is a stand alone and only SME server on the LAN with a single NIC.

Tyrone Miles

Re: virtualhost addresses issue
« Reply #5 on: January 04, 2003, 01:43:36 AM »
What machine are you using for DNS? Because what it sounds like is your DNS requests are going to and coming from a machine that does not have this host information in it. I tested what you were saying on my 2 e-amith servers (One is a standalone running 5.1 and one is my gateway server running 5.5 UD2) and my servers seem to pull what I want fine.

Bela

Re: virtualhost addresses issue
« Reply #6 on: January 04, 2003, 07:35:50 AM »
This is an all in one box. Running 5.1.2, but I have tried to do the same thing on a 5.5 and I had the same problem.
Thanks for all your time and help.


Networking parameters
Server Mode serveronly
Local IP address / subnet mask 192.168.8.10/255.255.255.0
Gateway 192.168.8.1
Additional local networks No additional local networks defined
DHCP server enabled
Beginning of DHCP address range 192.168.8.100
End of DHCP address range 192.168.8.200
Server names
DNS server 192.168.8.10
Web server www.panonia.net
Proxy server proxy.panonia.net:3128
FTP server ftp.panonia.net
SMTP, POP, and IMAP mail servers mail.panonia.net
Domain information
Primary domain panonia.net
Virtual domains csurdongolo.org
panonia.org
Primary web site http://www.panonia.net/
Mitel Networks SME Server manager http://savaria/server-manager/
Mitel Networks SME Server user password panel http://savaria/user-password/
E-mail addresses useraccount@panonia.net
firstname.lastname@panonia.net
firstname_lastname@panonia.net

Tyrone Miles

Re: virtualhost addresses issue
« Reply #7 on: January 04, 2003, 08:41:32 AM »
The question is what are the DNS settings of your client machines not the server it's self.

Bela

Re: virtualhost addresses issue
« Reply #8 on: January 05, 2003, 02:50:55 AM »
On the LAN the clients use the SME box. Outside of the LAN they use public dns. Both sides LAN and WAN see the same result that is www2.virtualdomain.com -where www2 is a host under the virtualdomain.com- takes you to www.primarydomain.com. For some reason it seems like that besides the default hosts anything else I set up and point it to whatever local/self/global will only take me to the host www under the primary domain. I cannot figure out why when I look at the zone files they seem just fine. Only the virtual domain zone file has record for www2. The primary domain should not even know about it.

Tyrone Miles

Re: virtualhost addresses issue
« Reply #9 on: January 05, 2003, 03:31:00 AM »
Well after reading in detail through the user guide section 11.5.1 it says: "Note that if your system is configured with any virtual domains, you will have the choice of the domain in which you want to create the hostname. This allows you, for instance, to have "www.tofu-dog.com" pointing to one IP address and "www.mycompany.xxx" pointing to a completely separate IP address."

I assume that this means you can't point other hostnames to Ibays on the local machine. (At least through the server manager interface)

Outside your local network (Or if you use a different server for DNS) you can then use that to point DNS requests to any directory and virtualhost on your machine.

I use zoneedit and it works great.