LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-08-2008, 12:41 AM   #1
SimbaSpirit
Member
 
Registered: Feb 2008
Posts: 109

Rep: Reputation: 15
How does apache2 virtual hosting work?


I've set up apache2 to work with a single webpage by placing it in /var/www, and I've read a few tutorials on creating a couple of websites.

Neither has explained how to set up the records, or how apache2 knows which site to display?

Ok say I have a computer named Server1, and I want to host websites www.ABC.com and www.XYZ.com.

How would I set up the records so apache2 knows which page to display? The last time I set up a record I just told it the name they'd type in, and the IP/port to associate with it, so if I have two records going to the same IP, what does apache use to intuit which page to display?

I'm sure I'm missing something stupid simple here :P

Thanks,
-SimbaSpirit
 
Old 06-08-2008, 09:05 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
I'm assuming you have one IP address for the 2 domain names. Have you had a look at the docs at http://httpd.apache.org/docs/2.0/vhosts/name-based.html and http://httpd.apache.org/docs/2.0/vhosts/examples.html yet? The other thing to confirm is that your domain names are resolvable by DNS, but that's outside of the Apache configuration.
 
  


Reply

Tags
apache, apache2, host, ip, multiple, port, records, websites



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
do I really need virtual hosting if only hosting one site kustomjs Linux - Server 8 05-22-2008 12:17 PM
apache2 virtual hosting ignores ServerName gjmwalsh Linux - Software 2 07-18-2006 04:31 PM
Hosting w Apache2...invisible to internet maxsanders Linux - Newbie 6 01-30-2006 10:50 AM
Help with Web Page Hosting and Apache2 Hambone_20003 Linux - Software 2 08-23-2005 08:31 PM
Virtual Hosting doesn't work, period! dontaylor2 Linux - Networking 6 08-24-2004 05:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:45 PM.

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
Open Source Consulting | Domain Registration