LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-01-2007, 01:02 PM   #1
dweeb
LQ Newbie
 
Registered: Apr 2004
Posts: 22

Rep: Reputation: 15
virtual hosts question


Hi

I own 2 domain names and would like to host the sites for these myself on my pc.

Is this possible? I would like the user to be directed to seperate homepages depending which url they used.

I can find plenty of tutorials on hosting, but nothing seems to help.

At the moment, users get the same homepage no matter which url they use.

Any help appreciated!

Thanks
Darren
 
Old 04-01-2007, 01:29 PM   #2
dweeb
LQ Newbie
 
Registered: Apr 2004
Posts: 22

Original Poster
Rep: Reputation: 15
I have managed to do this another way by altering the forwarding from my domain provider!

Darren
 
Old 04-01-2007, 02:21 PM   #3
SweetLou
Member
 
Registered: Oct 2004
Distribution: Debian Testing
Posts: 171

Rep: Reputation: 30
Glad you were able to find a way to do it. I use virtual hosts on my home system for testing. I just edit the /etc/apache2/sites-available/default file by adding:
Code:
<VirtualHost *>
    DocumentRoot /home/steve/www/lss/
    ServerName www.lss.com
</VirtualHost>
<VirtualHost *>
    DocumentRoot /home/steve/www/rovers/
    ServerName www.rovers.com
</VirtualHost>
This will allow me to type www.rovers.com or www.lss.com and get the different directories.
Now, this is for apache2, I don't know what web server you are running since you didn't tell us.
 
Old 04-01-2007, 02:25 PM   #4
dweeb
LQ Newbie
 
Registered: Apr 2004
Posts: 22

Original Poster
Rep: Reputation: 15
Thanks for the reply SweetLou.

Apologies, I am not used to posting for help am a newbie at this too! I will try to remember to post as much info as poss.

I am running apache2 by the way

Cheers

Darren.
 
Old 04-01-2007, 03:46 PM   #5
SweetLou
Member
 
Registered: Oct 2004
Distribution: Debian Testing
Posts: 171

Rep: Reputation: 30
Oh, I forgot to mention, these are not sites in the dns, well, www.rovers.com is, but not the thing on my pc. I had to edit the hosts file so that they will point localhost, this shouldn't be a problem with you, since you have your domains registered.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 07:29 AM
Apache 2 Virtual Hosts Question Maeltor Linux - Server 5 09-07-2006 08:59 PM
virtual hosts, virtual ip's? kuplo Linux - Newbie 3 11-29-2005 09:44 PM
apache virtual hosts question chrisfirestar Linux - Software 1 11-08-2004 06:24 AM
Question on virtual hosts and CGI-BIN directory cgchris99 Linux - General 9 10-11-2002 12:57 PM


All times are GMT -5. The time now is 04:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration