 |
Linode.com Forum Linode Community Forums
|
| Author |
Message |
Drakx
Joined: 25 Jan 2008
Posts: 3
|
| Posted: Fri Jan 25, 2008 12:01 pm Post subject: archlinux apache subdomain |
|
|
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 |
|
| Back to top |
|
mwalling
Joined: 10 Dec 2007
Posts: 136
|
| Posted: Fri Jan 25, 2008 12:12 pm Post subject: Re: archlinux apache subdomain |
|
|
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. |
|
| Back to top |
|
Drakx
Joined: 25 Jan 2008
Posts: 3
|
| Posted: Fri Jan 25, 2008 12:19 pm Post subject: |
|
|
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 |
|
| Back to top |
|
| |
|