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

Problems with the Windows version of XAMPP, questions, comments, and anything related.

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

Postby nvision » 11. September 2008 21:42

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?
nvision
 
Posts: 7
Joined: 06. September 2008 12:15

Postby glitzi85 » 19. September 2008 10:13

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
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 55 guests