Results 1 to 4 of 4
Hi - I used to have my web pages hosted by Lycos. Now that i've got my linux box, i've decided to host these myself. After registering with dyndns.org to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-04-2004 #1
- Join Date
- Feb 2004
Virtual Hosts, Subdomains and DNS
Hi - I used to have my web pages hosted by Lycos. Now that i've got my linux box, i've decided to host these myself. After registering with dyndns.org to set up my dynamic IP address, I can see my home page running from my own machine. Great!
I used to also have subdomains set up which I would also like to host on my own machine. So I've set up Virtual Hosts (because i only have one IP address, I am using named based virtual hosts)
The trouble is, I cannot see those Virtual Host pages from another computer, only locally. From playing around with the order of the entries in my httpd.conf file I can make different Virtual Hosts appear, so i figured out that the order in which those virtual hosts appear in httpd.conf file determines which pages is 'default'
So how to see the other pages?
I understand I may need to do something with DNS, but I dont know how and I dont know why. I've spent ages on google, installed Webmin, registered with every forum on the planet, read all the DNS/BIND docs i can find, but I cannot figure it out.
so say i have my web site --> www.mywebsite.com and i have two virtual hosts set up virtualhost1.mywebsite.com and virtualhost2.mywebsite.com, how do i set up my machine so i can access my virtualhost pages from anywhere other than my own machine?
Can someone help?
- 02-04-2004 #2
Firstly how do you connect to the net? Is the server inside a LAN? If the server is inside the LAN you will need to setup port fowarding as we dont know the network setup we cannot really help much more yet.
- 02-05-2004 #3
- Join Date
- Feb 2004
Giro, thanks for your reply
>> Firstly how do you connect to the net? Is the server inside a LAN?
I connect to the Internet using a cable modem. It's a simple network, i.e. just the one machine on which Apache runs. Not sure what other info you may need, let me know.
I am using Fedora.
One thing that crossed my mind on the way to work - if I can see my machine and my webpage from anywhere, then surely DNS is setup correctly? It's just a question then of configuring virtual hosts right?
- 02-08-2004 #4
- Join Date
- Jan 2003
- Cardiff, Wales
I would set up BIND to act as a DNS server. Then configure the DNS zone so that your computer is called www and is in the zone mywebsite.com. Then configure aliases virtualhost1 and virtualhost2.
This means that DNS requests for virtualhost1 and 2 @ your domain will point to you. This may need to be done at dyndns.org depending on how they work. They may point any requests to mywebsite.com to your PC (in which case the above will work) or they may only point www.mywebsite com at you, in which case BIND won't help.
Check out their website and see if they have any info on subdomains.
also you can specifiy a default virtual host (I think) or set one up for www.mywebsite.com explicitly as well as virtualhost1 etc. Remember www is the computer/host name in the URL so will be treated like anyother host / virtual host.No trees were harmed during the creation of this message. Its made from a blend of elephant tusk and dolphin meat.