archlinux apache subdomain
So I have a domain name thats in /home/user/public_html which when you use
here is the
<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…
<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:
Every time i try the above the website will not be shown any ideas?
Thanks
2 Replies
@Drakx:
<virtualhost ip.here.thx:80="">... ServerName www.domain.net ServerAlias *.domain.net ...</virtualhost>
<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.
and
sub.domain.com
still shows