999 vhosts domains for Windows XP. Small HowTo

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

999 vhosts domains for Windows XP. Small HowTo

Postby songoku25 » 02. August 2006 21:04

Change "hosts" file of windows XP ( C:\WINDOWS\system32\drivers\etc\ )
add something like this.

<code>
...
127.0.0.1 localhost
127.0.0.1 all
127.0.0.1 d00
127.0.0.1 d01
127.0.0.1 d02
127.0.0.1 d03
127.0.0.1 d04
127.0.0.1 d05
127.0.0.1 d06
127.0.0.1 d07
127.0.0.1 d08
127.0.0.1 d09
127.0.0.1 d10
127.0.0.1 d11
127.0.0.1 d12
127.0.0.1 d13
...
127.0.0.1 d999
</code>

Install Xampp on root folder C:\_WEBS for example. (better than C:\WEBS allways on top on file explorer, dreamweaver, etc...)

Add vhosts to apache config file ( C:\_WEBS\apache\conf\extra\httpd-vhosts.conf )

(i use missing.php for web delevepment, so is added on all "d* domains")


<code>
...
#all
<VirtualHost 127.0.0.1:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "c:/_WEBS/"
ServerName all
ErrorDocument 404 /missing.php
ErrorLog logs/all-error_log
CustomLog logs/all-access_log common
</VirtualHost>



#d00
<VirtualHost 127.0.0.1:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "c:/_WEBS/00/"
ServerName d00
ErrorDocument 404 /missing.php
ErrorLog logs/d00-error_log
CustomLog logs/d00-access_log common
</VirtualHost>


#d01
<VirtualHost 127.0.0.1:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "c:/_WEBS/01/"
ServerName d01
ErrorDocument 404 /missing.php
ErrorLog logs/d01-error_log
CustomLog logs/d01-access_log common
</VirtualHost>

...


#d999
<VirtualHost 127.0.0.1:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "c:/_WEBS/999/"
ServerName d999
ErrorDocument 404 /missing.php
ErrorLog logs/d999-error_log
CustomLog logs/d999-access_log common
</VirtualHost>
</code>

Execute “C:\_WEBS\php-switch.bat” if you want PHP4 instead of PHP5

Execute “C:\_WEBS\setup_xampp.bat” for xampp change all internal references to "C:\_WEBS\"

Edit C:\_WEBS\apache\conf\httpd.conf and change;

DocumentRoot to
<code>
DocumentRoot "c:/_WEBS"
</code>

AND

Directory to
<code>
<Directory "c:/_WEBS">
</code>

Make dir C:\_WEBS\00\ 01, 02, 03,...

Start XAMPP

Type on your browser http:\\d00

:)




PD: sorry for my terrible english level ;)

php scripts for generating "vhost" and "httpd-vhosts.conf", and directory listing of 999 "d domains" avaliables if someone wants them
songoku25
 
Posts: 2
Joined: 02. August 2006 20:39

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 40 guests