[olug] Apache and virtualHost

Ryan Stille ryan at cfwebtools.com
Tue Nov 21 15:33:51 UTC 2006


Eric, take a look at what you have for the NameVirtualHost directive.   
You probably want something like "NameVirtualHost *:80".

-Ryan

Eric P wrote:
> Hi all,
>
> We're switching over to Subversion at work, so instead of accessing
> files directly on our development server, each developer is setting up
> a local environment (Apache/ColdFusion in our case).
>
> Our development/live web servers have two domains set-up.
> dev.ourdomain.com  (points to: /htdocs/www)
> admin.dev.ourdomain.com  (points to: /htdocs/www/admin)
>
> We need to mimick this set-up on our local machines.  Currently, I
> have the following in Apache's http.conf:
>
> ServerName eric.dev.ourdomain.com
> ...
> <VirtualHost *>
>   ServerName eric.dev.ourdomain.com
>   DocumentRoot /htdocs/www
> </VirtualHost>
>
> <VirtualHost *>
>   ServerName eric.admin.dev.ourdomain.com
>   DocumentRoot /htdocs/www/admin
> </VirtualHost>
>
> But going to http://eric.admin.dev.ourdomain.com, Apache still points
> to /htdocs/www (not /htdocs/www/admin)
>
> Any idea where I'm off here?
>
> Also, here is my hosts file.
> 127.0.0.1       localhost
> 127.0.0.1       eric.dev.ourdomain.com
> 127.0.0.1       eric.admin.dev.ourdomain.com
>
> Thanks for reading and I appreciate any comments.
> Eric Pierce
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug
>
>   





More information about the OLUG mailing list