Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Jan 25, 2008 1:01 pm 
Offline
Newbie

Joined: Fri Jan 25, 2008 10:32 am
Posts: 3
Hi

So I have a domain name thats in /home/user/public_html which when you use www.domain.com brings up the right page, how ever now i want todo http://subdns.domain.com ive edited vhosts.conf for apache and for some reason when i try it it shows me the main page as if i was doing www.domain.com and not sub.domain.com

here is the www.domain.com seciton:

Code:
<VirtualHost ip.here.thx:80>
    ServerAdmin webmaster@domain.net
    DocumentRoot "/home/user/public_html/"
    <Directory />
       Options FollowSymLinks
       AllowOverride All
    </Directory>
    <Directory /home/user/public_html>
       Options Indexes FollowSymLinks MultiViews
       AllowOverride All
       allow from all
    </Directory>
   
    ServerName www.domain.net
    ServerAlias *.domain.net
    ErrorLog "/var/log/httpd/domain.net-error_log"
    CustomLog "/var/log/httpd/domain-access_log" common
</VirtualHost>


This is the sub domain section...

Code:
<VirtualHost ip.here.thx:80>
    ServerAdmin webmaster@domain.net
    DocumentRoot "/home/user/public_html/subdomain"
    <Directory />
       Options FollowSymLinks
       AllowOverride All
    </Directory>
    <Directory /home/user/public_html/irpg>
       Options Indexes FollowSymLinks MultiViews
       AllowOverride All
       allow from all
    </Directory>
   
    ServerName sub.domain.net
    ServerAlias *.domain.net
    ErrorLog "/var/log/httpd/domain.net-error_log"
    CustomLog "/var/log/httpd/domain.net-access_log" common
</VirtualHost>


Also I've noticed that i must place the ip address instead of like this:
<VirtualHost www.domain.net:80>
</VirtualHost>

Every time i try the above the website will not be shown any ideas?

Thanks


Top
   
PostPosted: Fri Jan 25, 2008 1:12 pm 
Offline
Senior Member
User avatar

Joined: Mon Dec 10, 2007 4:30 pm
Posts: 341
Website: http://markwalling.org
Drakx wrote:
Code:
<VirtualHost ip.here.thx:80>
 ...
    ServerName www.domain.net
    ServerAlias *.domain.net
...
</VirtualHost>


Code:
<VirtualHost ip.here.thx:80>
...
    ServerName sub.domain.net
    ServerAlias *.domain.net
...
</VirtualHost>




If you pasted these in the order they appear to apache, anything.domain.com will be caught by the first block, because you have a *.domain.com for the alias.


Top
   
 Post subject:
PostPosted: Fri Jan 25, 2008 1:19 pm 
Offline
Newbie

Joined: Fri Jan 25, 2008 10:32 am
Posts: 3
hmm ok so ive changed the server aliases to

www.domain.com
and
sub.domain.com

still shows www.domain.com site on sub.domain.com but the folder i made for sub.domain.com should be empty


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group