On 9/14/05, Josh Vickery <[EMAIL PROTECTED]> wrote:
> Your config snippets look ok to me.  I would check to make sure there
> is not another virtual host directive that is overriding this
> somewhere else.  NameVirtualHost *
> <VirtualHost *>
> ...
> for example.
> 
> On 9/12/05, matt-nc <[EMAIL PROTECTED]> wrote:
> > I'm trying to get a name-based virtual host to point to a directory under a
> > user instead of the default directory for localhost.
> >
> > I created a name-based virtual host in Apache2 by putting the following in
> > httpd.conf:
> >
> > NameVirtualHost *:80
> >
> > <VirtualHost *:80>
> >         DocumentRoot /home/amos/dev/php.dev
> >         ServerName php.dev
> > </VirtualHost>
> >
> > then I added the following to the hosts file:
> >
> > 127.0.0.1       php.dev
> >
> >
> > Now when I put php.dev in the URL window of the browser it points to the
> > default document root for localhost which is
> >
> > /var/www/html
> >
> > instead of where I want it to point:
> >
> > /home/amos/dev/php.dev
> >
> > Is it possible to do what I am trying to do?
> >
> > Thanks,
> > Matt

It might be a good idea to check the log files and/or manually start
Apache and see if it complains about the config on startup.  For SOME
cases where you've set up the config in a way that it won't resolve
vhosts the way you might expect, it will tell you, perhaps
cryptically.
--
TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ  : http://trilug.org/faq/
TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
TriLUG PGP Keyring         : http://trilug.org/~chrish/trilug.asc

Reply via email to