Results 1 to 9 of 9
Hi all,
I'm a newbie to Linux and first time trying to set up my own web server.
I have been doing lots of reasearch over the net for the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-18-2003 #1Just Joined!
- Join Date
- Jun 2003
- Posts
- 50
need help with virtual host and some dns questions
Hi all,
I'm a newbie to Linux and first time trying to set up my own web server.
I have been doing lots of reasearch over the net for the past two weeks.
Here is what I accomplished so far:
Installed Linux 9
Running Apache
Loaded webmin and usermin --- awesome program! btw
I am doing all this testing within an internal network, no internet connection yet. This is what I'm having problems with now.
I am trying to test setting up virtual hosting. I added the 2 virtual host names to the httpd.conf file but I have no clue on how to set up a DNS record on the server. Can someone please give me the steps?
I also have some basic questions regarding DNS server. Since I don't have a static IP, I must use one of those dynamic DNS hosting services. If so, do I still need a local DNS server for my emails and virtual hosts?
What I really mean is can I still run my own webserver and email domain without running a DNS server off my server?
Thanks in advance. I'm sorry for being such a newbie but I am trying.
- 06-19-2003 #2Linux User
- Join Date
- May 2003
- Location
- CA
- Posts
- 370
by "to set up a DNS record on your server" i am assuming you want to
identify it uniqely with a domain name.
then you will need to place
"ServerName <your url>"
in your virtualhost directive.
for eg:
<VirtualHost *>
# ServerName dummy-host.example.com
#</VirtualHost>
- 06-19-2003 #3Just Joined!
- Join Date
- Jun 2003
- Posts
- 50
I got that setup but I need my DNS to resolve those names. For example I created www.cats.com and www.dogs.com in the same server. How should I configure my DNS so when I type www.cats.com it'll resolve and point to the cats.com folder and not the dogs.com folder? I'm new to the DNS server thing, so much information on the net and so confusing.
Thank you for trying to help me, I really appreciated.
- 06-19-2003 #4Linux User
- Join Date
- May 2003
- Location
- CA
- Posts
- 370
well, do you have a local dns server or are you using an external one?
on your internal network, if you have setup apache correctly, does www.cats.com and www.dogs.com take you to the correct place?
regarding dns, you will have to specify the ip address for each url and forward the corresponding ports on the router.
- 06-22-2003 #5Just Joined!
- Join Date
- Jun 2003
- Posts
- 50
Thanks for helping me nikhil. I did some more research and I'm using zoneedit as my dns now. Setting up my own dns is too complicated for me, I gave up. But I am having problems with my virtual hosts now. I'm running name virtual host on my linux box. I set up zoneedit to point to the same ip address for both domains. I upated my httpd.conf to include:
NameVirutalHost myiphere
<VirtualHost myiphere>
DocumentRoot /var/www/domain1
ServerAdmin webmaster@domain1.com
ServerName www.domain1.com
ServerSignature email
</VirtualHost>
<VirtualHost myiphere>
DocumentRoot /var/www/domain2
ServerAdmin webmaster@domain2.com
ServerName www.domain2.com
ServerSignature email
</VirtualHost>
But everytime I point to domain1 or domain2 on the browser, I get the default Test Page. It doesn't matter what I put in the /var/www/domain1 or domain2 directory. I always get the Test Page. I try changing my index.html to index.htm or index.php.. or whatever. I don't know why is not resolving to my domain1 host or domain2 host. I even went out to buy a book, couldn't find explanation there. Did search on setting up virtual host on the net... read all the How-tos and docs regarding virutal host... I just don't see what else I need to do. When I try putting the * in place of my IP, I get error on starting the httpd. Please read my other post for the exact error. Please help. I really don't know what else to do.
- 06-23-2003 #6Linux User
- Join Date
- May 2003
- Location
- CA
- Posts
- 370
Hi,
Well everything in your httpd.conf file looks ok except the entry
"NameVirutalHost myiphere"
this should be
"NameVirtualHost myiphere"
you have got the spelling wrong...try that and let me know...your
configuration looks correct.
- 06-23-2003 #7Just Joined!
- Join Date
- Jun 2003
- Posts
- 50
Oh... sorry I misstyped it, stupid me. The spelling is correct on my httpd.conf file. I am about to reinstall the whole thing. Maybe I screwed something up. If you can think of anything else that I'm missing let me know. Thanks!
- 06-23-2003 #8Linux User
- Join Date
- May 2003
- Location
- CA
- Posts
- 370
hey, dont re-install the whole thing...that way we wont know what is going wrong.
are you getting anything in the error logs? did you do a tcpdump and see the output?
try putting the ip-address and the port number in the virtualhost directive and see if that mapping works.
<VirtualHost ip-add
ortno1>
www.domain1.com
and
<VirtuaHost ip-add
ortno2>
www.domain2.com
- 06-23-2003 #9Just Joined!
- Join Date
- Jun 2003
- Posts
- 50
Okay, I will give that a try. Thanks nikhil.



