Page 1 of 1

Setup Subdomain Under XAMPP

PostPosted: 31. December 2006 21:09
by Gamzarme
Another quick question for you genius Linux gurus out there. How would one go about setting up a sub-domain using XAMPP? I've looked in the configuration files and haven't found anything even remotely related to this.

-Patrick

PostPosted: 21. January 2007 17:43
by wuzzboy
Not sure if this it what you mean but ill give it a shot..
I have domain.com with my home page and i wanted webmail.domain.com so i could read my mail online (duh).

i httpd.conf i UNcomented
Code: Select all
# Virtual hosts
#Include etc/extra/httpd-vhosts.conf

To
Code: Select all
 # Virtual hosts
Include etc/extra/httpd-vhosts.conf

Then i edited the etc/extra/httpd-vhosts.conf file and added this
Code: Select all
NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot /opt/lampp/htdocs
ServerName default
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /opt/lampp/htdocs/webmail
ServerName webmail.domain.com
</VirtualHost>


This works for me.

Not sure if this is correct but as i said it worx for me :-)
Hope it helps.

Re: Setup Subdomain Under XAMPP

PostPosted: 27. March 2012 08:07
by varunms
HI

the code which you have given is working in doamin as localhost but there is one problem

i need replace the doamin as a ip

i have replaced as

<VirtualHost *:80>
DocumentRoot /opt/lampp/htdocs/workspace/sunb/
ServerName *.192.168.0.89
</VirtualHost>

but i when i create a sub doamin as abd.192.168.0.89 i get server not found error