You only need create another virtual host container for the subdomain in the httpd-vhost.conf file.
Example:
You have a container set up for the main domain
site.com
Make sure that works just fine.
Then create another container for
subdomain.site.com just under the main container to keep it tidy.
This will of course point to the directory
subdomain in the main domain directory of
site.com.
Here is an example of what I mean:
- Code: Select all
<VirtualHost *:80>
ServerName site.com
<Directory "C:/xampp/home/site" >
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
DocumentRoot "C:/xampp/home/site"
ScriptAlias /cgi-bin/ "C:/xampp/home/site/cgi-bin/"
ServerAdmin izzy@site.com
CustomLog domlogs/siteaccess.log combined
ErrorLog domlogs/siteerror.log
LogLevel error
</VirtualHost>
<VirtualHost *:80>
ServerName subdomain.site.com
<Directory "C:/xampp/home/site/subdomain" >
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
DocumentRoot "C:/xampp/home/site/subdomain"
ScriptAlias /cgi-bin/ "C:/xampp/home/site/subdomain/cgi-bin/"
ServerAdmin izzy@site.com
CustomLog domlogs/subdomainaccess.log combined
ErrorLog domlogs/subdomainerror.log
LogLevel error
</VirtualHost>
This method is useful because it gives you full control over the server's configuration of the subdomain just like you have over the main domain.
HTH
=================================================
Take a look at the new
DeskTopXampp launch control posted by
ridgewood:
http://community.apachefriends.org/f/viewtopi ... 967#103967
The
DeskTopXampp launch control for
XAMPP and
XAMPPlite (DTX.exe)
is available here:
http://zedfiles.com/DTX/
I highly recommend DTX.
=================================================