Download your favorite Linux distribution at LQ ISO.
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 03-18-2005, 10:55 AM   #1
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Rep: Reputation: 30
Accessing apache shared hosts?

Hi folks,

I have a rack box, that's currently serving about 8 domains. I know how to set DNS and whatnot for new domains, and it all works perfectly once the DNS is up.

My question is, how do I access the files before DNS goes through? I've got one IP address shared, and to my knowledge all of the forwarding to the proper URL is done by Apache.

If I hit my IP address, I get an apache default page.

My web root for the sites are:


Old 03-19-2005, 09:46 AM   #2
Registered: Dec 2003
Location: Calgary, AB
Distribution: Any!
Posts: 146

Rep: Reputation: 18
If I understand your question right, you want to have 8 domain names that go to 8 different pages on apache. If that's right, then what you need to do is set up Virtual Hosting in apache.

Here's a quick rundown. I'll assume you're using apache2:

In your httpd.conf file, uncomment or add the line:
NameVirtualHost *:80
Now you're going to want to set up a VirtualHost block for each of the domains. The first one will be the site that shows up when you just put the IP address in. They look like so:

<VirtualHost *:80>
  DocumentRoot /path/to/document/root
That is the bare amount you can have in a VH block. Check the apache documentation for all other options (Like splitting up log files for easier stats and stuff).

Hope that helps


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
Accessing Network shared data in Linux salik Linux - General 7 11-28-2005 10:39 AM
suPhp, virtual hosts, and shared code? miscreant Linux - Software 0 07-13-2005 07:09 PM
Accessing MY virtual hosts from MY Lan. TheSwine Linux - Networking 2 03-02-2004 03:41 PM
accessing a shared folder on a server dimitri358 Linux - Software 3 02-16-2004 08:17 AM
Question about accessing shared directories zikfreak Linux - Newbie 0 08-18-2001 05:19 PM > Forums > Linux Forums > Linux - Software

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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration