-   Linux - Software (
-   -   Accessing apache shared hosts? (

Seventh 03-18-2005 10:55 AM

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:



auximini 03-19-2005 09:46 AM

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

All times are GMT -5. The time now is 03:47 AM.