NYCPHP Meetup

NYPHP.org

[nycphp-talk] Virtual Hosts

jon baer jonbaer at jonbaer.net
Mon Sep 8 03:09:59 EDT 2003


it works in conjunction with your host file

windows/system32/drivers/etc/hosts

in which case ur ip will be given a local name to use as part of the "host:"
header to allow for multiple setups.  you need to edit the file in order to
get a developmental virtual hosting setup running.

192.168.0.7    linuxbox

typing in "linuxbox" would resolve to 192.168.0.7 and

<VirtualHost *>
DocumentRoot "c:\somewhere"
ServerName linuxbox
</VirtualHost>

would let you map it back ... you can also use a mounted DocumentRoot (x:,
y:, z:, etc)

- jon

----- Original Message -----
From: "Jeff" <jsiegel1 at optonline.net>
To: "'NYPHP Talk'" <talk at lists.nyphp.org>
Sent: Monday, September 08, 2003 3:32 PM
Subject: [nycphp-talk] Virtual Hosts


> I was looking at Dan Kushner's presentation on Setup/Dev under Win2000
> at
> http://www.nyphp.org/content/presentations/ampintro3/
>
> I found this on slide 19 of the presentation.
>
>       <VirtualHost *>
>          DocumentRoot "c:\sites\foo.localhost"
>          ServerName foo.localhost
>          php_value auto_prepend_file
> "c:\sites\foo.localhost\prepend.inc"
>       </VirtualHost>
>
>       <VirtualHost *>
>          DocumentRoot "c:\sites\bar.localhost"
>          ServerName bar.localhost
>       </VirtualHost>
>
> The question is, how do I adapt this for the following scenario:
>
> My development is done on a separate server (Linux box) and is accessed
> solely with an IP address. Therefore, I'm not doing development on the
> same box as PHP and, correct me if I'm wrong, I can't use "localhost" as
> part of the address to get to the Linux box. How do I accomplish the
> virtual hosting thing in this scenario? (At present I'm using port
> numbers but that's kinda clumsy.)
>
> Jeff
>
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
>




More information about the talk mailing list