Click to See Complete Forum and Search --> : [RESOLVED] Apache Sub-Domain


code?
May 13th, 2009, 09:00 PM
Ok, first, what is this?

[_] Create wildcard alias for "*.host.domain.tld"

Secondly, I have it working at new.iggyhopper.dyndns.org, but it serves from the same directory as my main domain.

Here is my config code.
<VirtualHost new.iggyhopper.dyndns.org:80>
ServerName new.iggyhopper.dyndns.org:80
ServerAdmin Iggyhopper91@gmail.com
DirectoryIndex index.htm index.php
DocumentRoot "C:\Server\Main"
<Directory "C:/Server/Main">
Order allow,deny
Allow from all
AllowOverride All
AddType application/x-httpd-php php php4 php3 html htm
</Directory>
</VirtualHost>

Can anyone tell me what is wrong?

EDIT:

You can't have just one normal normal, and one name-based virtual host. You have to have both your domain, and sub domain, on a vHost. Here's my code.


NameVirtualHost *:80

<VirtualHost *:80>
ServerName iggyhopper.dyndns.org
#ServerAdmin !@#$
DirectoryIndex index.htm index.php
AddType application/x-httpd-php php php4 php3 html htm js
DocumentRoot "C:/Server/172.16.1.35"
<Directory "C:/Server/172.16.1.35">
Order allow,deny
Allow from all
AllowOverride All
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName new.iggyhopper.dyndns.org
#ServerAdmin !@#$
DirectoryIndex index.htm index.php
AddType application/x-httpd-php php php4 php3 html htm js
DocumentRoot "C:\Server\Main"
<Directory "C:/Server/Main">
Order allow,deny
Allow from all
AllowOverride All
</Directory>
</VirtualHost>


There you go.