NYCPHP Meetup

NYPHP.org

[nycphp-talk] Virtual Hosts

Jeff jsiegel1 at optonline.net
Mon Sep 8 16:33:14 EDT 2003


Thank you Chris and Jon. I think I'm almost there.

This is what I have in my "hosts" file on WinXP:

192.168.1.111   unap
192.168.1.111   myproj


When I run apachectl configtest it comes back with this message. 
[warn] NameVirtualHost 192.168.1.111:80 has no VirtualHosts

Obviously...I'm missing some setting. 

Jeff



-----Original Message-----
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]
On Behalf Of jon baer
Sent: Monday, September 08, 2003 2:10 AM
To: NYPHP Talk
Subject: Re: [nycphp-talk] Virtual Hosts


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
>

_______________________________________________
talk mailing list
talk at lists.nyphp.org
http://lists.nyphp.org/mailman/listinfo/talk




More information about the talk mailing list