LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-27-2004, 11:18 PM   #1
Big Brad
Member
 
Registered: Jul 2003
Location: Australia, Geelong
Distribution: Red Hat 8 & Fedora Core 3
Posts: 52

Rep: Reputation: 15
Subdomains & Apache Vhosts


Hi Everyone

I am having truoble with creating a subdomain. I have http://www.bjc.id.au/ working fine. But I want to get http://montrose.bjc.id.au/ to go to a different page on the same web server. At the moment both return the same page and I want the montrose to return a diffrent page. I have tried setting up a second Vhost under apache with a diffrent document root. I am not sure whats wrong. I have tried to solve this my self with google and I only ever post here as a last resort.

Here is my zone file.


$TTL 86400
@ IN SOA ns1.bjc.id.au. support.bjc.id.au. (
29 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)


@ IN NS 203.87.32.230.
@ IN NS ns1.bjc.id.au.

@ IN MX 10 mail
bjc.id.au. IN MX 10 mail.bjc.id.au.

bjc.id.au. IN A 203.87.32.230
mail IN A 203.87.32.230
@ IN A 203.87.32.230
montrose IN A 203.87.32.230
ftp IN A 203.87.32.230

www IN CNAME bjc.id.au.


Later on I would like to get ftp.bjc.id.au and mail.bjc.id.au to piont to the obvious places. But once again they only piont to the main page.

Please If you could help it would be great.

Thanks Brad
 
Old 01-28-2004, 12:53 AM   #2
Big Brad
Member
 
Registered: Jul 2003
Location: Australia, Geelong
Distribution: Red Hat 8 & Fedora Core 3
Posts: 52

Original Poster
Rep: Reputation: 15
I thought this might be useful as well.
<VirtualHost 192.168.2.3>
DocumentRoot /home/bjc/www
ServerAdmin support@bjc.id.au
ServerName bjc.id.au
ServerAlias www.bjc.id.au
ServerSignature email
DirectoryIndex index.html index.php index.htm index.shtml
ServerSignature email
</VirtualHost>


<VirtualHost 192.168.2.3>
DocumentRoot /home/bjc/www/Montrose
ServerAdmin support@bjc.id.au
ServerName montrose.bjc.id.au
ServerAlias montrose.bjc.id.au
DirectoryIndex index.html index.php index.htm index.shtml
</VirtualHost>
 
Old 01-28-2004, 03:44 AM   #3
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Have you put
Code:
NameVirtualHost 192.168.2.3
?

Last edited by Demonbane; 01-28-2004 at 03:46 AM.
 
Old 01-28-2004, 04:12 AM   #4
Big Brad
Member
 
Registered: Jul 2003
Location: Australia, Geelong
Distribution: Red Hat 8 & Fedora Core 3
Posts: 52

Original Poster
Rep: Reputation: 15
I am using the redhat config tool. And I have selected name based. So I asume that it is correct.
 
Old 01-28-2004, 05:06 AM   #5
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Better double check anyway, here's my vhost configuration that works fine on my LAN, see if its any help:
Code:
NameVirtualHost 192.168.0.2

<VirtualHost 192.168.0.2>
Servername ciel
DocumentRoot /var/www/localhost/htdocs
</VirtualHost>

<VirtualHost 192.168.0.2>
Servername public.ciel
DocumentRoot /var/www/localhost/htdocs/public
</VirtualHost>
 
Old 01-28-2004, 05:56 AM   #6
Big Brad
Member
 
Registered: Jul 2003
Location: Australia, Geelong
Distribution: Red Hat 8 & Fedora Core 3
Posts: 52

Original Poster
Rep: Reputation: 15
Yes mine does have the NameVirtualHost 192.168.2.3
I just missed it when I copyed it.
 
Old 01-28-2004, 09:48 PM   #7
Big Brad
Member
 
Registered: Jul 2003
Location: Australia, Geelong
Distribution: Red Hat 8 & Fedora Core 3
Posts: 52

Original Poster
Rep: Reputation: 15
Thanks Guys I have fixed my problem.
 
Old 01-28-2004, 10:28 PM   #8
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Just for the record what was the problem and how did you solve it?
 
Old 01-28-2004, 10:36 PM   #9
Big Brad
Member
 
Registered: Jul 2003
Location: Australia, Geelong
Distribution: Red Hat 8 & Fedora Core 3
Posts: 52

Original Poster
Rep: Reputation: 15
Ok well basicly I found out later that my secondary dns server was serving incorrectly and it was almost as if it was just telling *.bjc.id.au to get redirected to www.bjc.id.au. Anyway it all fixed now.

Thanks Brad
 
  


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
APACHE and Subdomains basketkase999 Linux - Software 18 05-21-2005 11:38 PM
apache userdir subdomains kodon Linux - Networking 7 08-09-2004 08:16 PM
Apache and Subdomains, Help pzorn Linux - General 2 01-27-2004 08:00 PM
Networking questions : Setting up domains/vhosts/subdomains/IPs etc. Belize Linux - Networking 1 09-16-2003 04:39 AM
Vhosts on RH 8.0 - Apache 2.0.40 Drogo Linux - Software 5 02-07-2003 12:28 AM


All times are GMT -5. The time now is 09:23 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration