NYCPHP Meetup

NYPHP.org

[nycphp-talk] Need virtual host Apache help ...

Daniel Kushner nyphp at websapp.com
Thu May 22 09:45:40 EDT 2003


Hi Jon,

On my Windows development enviroment, I do this:
Create virtual hosts in httpd.conf
<VirtualHost *>
    ServerName dev.nyphp.org
    DocumentRoot "d:\\sites\\dev.nyphp.org"
</VirtualHost>

You can also define other server specific configurations there as well as
PHP ini values.

In the hosts file (C:\\WINNT\\system32\\drivers\\etc\\hosts) I add the virtual
domain to resolve to my localhost:
127.0.0.1	dev.nyphp.org

The (IE) browsers needs to be closed before any changes in the hosts file
will kick in.

(This can also be done on a Linux box)

Hope this helps.

Best,
Daniel Kushner
Vice President, New York PHP
http://nyphp.org/
daniel at nyphp.org



> -----Original Message-----
> From: Jon Baer [mailto:jonbaer at jonbaer.net]
> Sent: Thursday, May 22, 2003 9:39 AM
> To: NYPHP Talk
> Subject: Re: [nycphp-talk] Need virtual host Apache help ...
>
>
> Much of the code reflects on relative directories based on the
> root path ...
> (images, styles, etc) ...
>
> ----- Original Message -----
> From: "John Lacey" <jlacey at ix.netcom.com>
> To: "NYPHP Talk" <talk at nyphp.org>
> Sent: Thursday, May 22, 2003 6:33 AM
> Subject: Re: [nycphp-talk] Need virtual host Apache help ...
>
>
> >
> > why not just have each site in a separate directory under DocumentRoot?
> >
> > e.g. if the document root is /var/www/html, then site directories under
> > that path, "site1", "site2", etc
> >
> > so the only thing you'd have to do is http://locahost/site1
> > and so forth...  or just localhost/site1
> >
> >
> >
> >
> >
> > ----- Original Message -----
> > From: "Jon Baer" <jonbaer at jonbaer.net>
> > To: "NYPHP Talk" <talk at nyphp.org>
> > Sent: Thursday, May 22, 2003 7:18 AM
> > Subject: [nycphp-talk] Need virtual host Apache help ...
> >
> >
> > Im trying to setup my laptop to host 5 different PHP-based sites for dev
> > purposes and getting lost on how to setup Virtual hosting so that it's
> > port
> > based w/Apache (I can't remember if it could do it or not or if it was
> > another webserver), ie. port 81 -> site 1, port 82 -> site 2, etc.
> >
> > <VirtualHost *>
> > ?
> > </VirtualHost>
> >
> > Any ideas?  I just would like to not edit httpd.conf every time.
> >
> > - Jon
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>
> --- Unsubscribe at http://nyphp.org/list/ ---
>





More information about the talk mailing list