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 |
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> |
Have you put
Code:
NameVirtualHost 192.168.2.3 |
I am using the redhat config tool. And I have selected name based. So I asume that it is correct.
|
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 |
Yes mine does have the NameVirtualHost 192.168.2.3
I just missed it when I copyed it. |
Thanks Guys I have fixed my problem.
|
Just for the record what was the problem and how did you solve it?
|
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 |
All times are GMT -5. The time now is 06:38 AM. |