Indulging some patience to list subscribers regarding a not 100% in 
topic message (but nevertheless very usefull to php under windows)...

Here is as promissed a overview of my configs with virtual hosting with 
apache under windows...

Install apache then...

change the hosts file located in \winnt\system32\drivers\etc

127.0.0.1    localhost
127.0.0.1    otherdomainalias


then at the end of apache hosts.conf there is the following block

#
# Use name-based virtual hosting.
#
#NameVirtualHost *

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *>
#    ServerAdmin [EMAIL PROTECTED]
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>


uncoment the following:

NameVirtualHost *

<VirtualHost *>
    ServerAdmin webmaster@localhost
    DocumentRoot C:/Apache/htdocs
    ServerName localhost
    ErrorLog logs/localhost.example.com-error_log
    CustomLog logs/localhost.example.com-access_log common
</VirtualHost>

<VirtualHost *>
    ServerAdmin webmaster@otherdomainalias
    DocumentRoot e:/sites
    ServerName otherdomainalias
    ErrorLog logs/otherdomainalias.example.com-error_log
    CustomLog logs/otherdomainalias.example.com-access_log common
</VirtualHost>

The entries that matter are the DocumentRoot which must point to a winnt 
valid directory (root directory on one disk won't do) and
ServerName which must mimick each of the entries inserted in the hosts

Then restart apache and it should have two domains locally configured 
(the operative word is locally, because as there isn't a dns server, 
they will only work locally, unless on want's to indulge in a very 
complex dns hand administrations by shuffling hosts and lmhost files 
arround!)...

You just need to repeat the virtual host block for each aliased domain 
to 127.0.0.1...

Hope that helps... To me is invaluable to test and develop in PHP/MySQL 
with diferent domains at the same time and also to allow local 
documentation when that is distributed as html files...

Cheers,
Luis Ferro



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to