LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-18-2005, 09:55 AM   #1
Seventh
Member
 
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:

/home/httpd/vhosts/domain.xxx/httpdocs

Thanks!
 
Old 03-19-2005, 08:46 AM   #2
auximini
Member
 
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:
Code:
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:

Code:
<VirtualHost *:80>
  ServerName website.com
  ServerAlias www.website.com
  DocumentRoot /path/to/document/root
</VirtualHost>
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
 
  


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


All times are GMT -5. The time now is 05:38 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration