Page 1 of 1

Can I create a subdomain or Domain with XAMPP for separatio?

PostPosted: 11. September 2008 21:42
by nvision
I am trying to learn a framework that seems to want to be installed in the root. But I don't want this. I want to create a separate area for this framework.

I usually use XAMPP and run all my site within a folder of the main htdocs.


Is is possible to create a second htdocs folder? or subdomain?

PostPosted: 19. September 2008 10:13
by glitzi85
Assuming that you installed XAMPP to C:\xampp:

Open this file:
Code: Select all
C:\xampp\apache\conf\extra\httpd-vhosts.conf

with any Texteditor. Then put this inside the file:

Code: Select all
NameVirtualHost *:80

<VirtualHost *:80>
   DocumentRoot /xampp/htdocs
   ServerName localhost
</VirtualHost>

<VirtualHost *:80>
   DocumentRoot /xampp/framework
   ServerName framework
</VirtualHost>

<Directory "C:\xampp\framework">
   Order allow,deny
   allow from all
</Directory>


Now you have to create the folder C:\xampp\framework and start Apache. Open this file:

Code: Select all
C:\Windows\system32\drivers\etc\hosts


with Notepad and add this line:

Code: Select all
127.0.0.1     framework


Put your Framwork-Data inside the Folder C:\xampp\framework and call http://framwork in your Browser.

glitzi