Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 06-08-2008, 12:41 AM   #1
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 and

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

Old 06-08-2008, 09:05 PM   #2
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 and yet? The other thing to confirm is that your domain names are resolvable by DNS, but that's outside of the Apache configuration.


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

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
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 > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:38 PM.

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