You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Stand H <hs...@yahoo.com> on 2003/07/24 07:03:30 UTC

[users@httpd] equivalent?

Hi,

Are the two config equivent?

<VirtualHost www.myserver.com>
        ServerAdmin webmaster@myserver.com
        ServerName www.myserver.com
        DocumentRoot /var/www/html
        Options Indexes
        <Directory "/var/www/html">
                AllowOverride AuthConfig FileInfo
Limit
                Order allow,deny
                Allow from all
        </Directory>
</VirtualHost>


<VirtualHost www.myserver.com>
        ServerAdmin webmaster@myserver.com
        ServerName www.myserver.com
        DocumentRoot /var/www/html
        Options Indexes
        AllowOverride AuthConfig FileInfo Limit
        Order allow,deny
        Allow from all
</VirtualHost>

Thanks,

Stand

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] equivalent?

Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 23 Jul 2003, Stand H wrote:

> Hi,
>
> Are the two config equivent?

No.  Your basic question boils down to: does it make a difference whether
I place directives in the virtualhost context or inside a <directory> in
the virtualhost context?  The answer is yes.  The two sets of directives
will be merged differently with the rest of your config.

For details see:
http://httpd.apache.org/docs-2.0/sections.html#mergin
which shows that the placement of directives can have important effects.

In addition, it is recommended to always use an IP address as the argument
to the <VirtualHost> directive, rather than a hostname.  See the virtual
host docs.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] equivalent?

Posted by Stand H <hs...@yahoo.com>.
Hi,

Can you tell me the invalid point?

Thanks,

Stand
--- Jeff Cohen <su...@gej-it.com> wrote:
> Both Vhsots are not valid, but the first made more
> sense to me.
> They should look like that:
> ** notice the ServerName directive.
> 
> <VirtualHost *>
>         ServerAdmin webmaster@myserver.com
>         ServerName www.myserver1.com
>         DocumentRoot /var/www/html
>         Options Indexes
>         <Directory /var/www/html>
>           AllowOverride AuthConfig FileInfo Limit
>           Order allow,deny
>           Allow from all
>         </Directory>
> </VirtualHost>
> 
> <VirtualHost *>
>         ServerAdmin webmaster@myserver.com
>         ServerName www.myserver2.com
>         DocumentRoot /var/www/html
>         Options Indexes
>         <Directory /var/www/html>
>           AllowOverride AuthConfig FileInfo Limit
>           Order allow,deny
>           Allow from all
>         </Directory>
> </VirtualHost>
> 
> All the best,
> Jeff Cohen
> Support@GEJ-IT.com
> Tel. (416) 917-2324
> www.GEJ-IT.com
> GEJ-IT Networks!
> 
> 
> 
> > -----Original Message-----
> > From: Stand H [mailto:hstandit@yahoo.com]
> > Sent: Thursday, July 24, 2003 1:04 AM
> > To: users@httpd.apache.org
> > Subject: [users@httpd] equivalent?
> > 
> > Hi,
> > 
> > Are the two config equivent?
> > 
> > <VirtualHost www.myserver.com>
> >         ServerAdmin webmaster@myserver.com
> >         ServerName www.myserver.com
> >         DocumentRoot /var/www/html
> >         Options Indexes
> >         <Directory "/var/www/html">
> >                 AllowOverride AuthConfig FileInfo
> > Limit
> >                 Order allow,deny
> >                 Allow from all
> >         </Directory>
> > </VirtualHost>
> > 
> > 
> > <VirtualHost www.myserver.com>
> >         ServerAdmin webmaster@myserver.com
> >         ServerName www.myserver.com
> >         DocumentRoot /var/www/html
> >         Options Indexes
> >         AllowOverride AuthConfig FileInfo Limit
> >         Order allow,deny
> >         Allow from all
> > </VirtualHost>
> > 
> > Thanks,
> > 
> > Stand
> > 
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> > http://sitebuilder.yahoo.com
> > 
> >
>
---------------------------------------------------------------------
> > The official User-To-User support forum of the
> Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html>
> for more info.
> > To unsubscribe, e-mail:
> users-unsubscribe@httpd.apache.org
> >    "   from the digest:
> users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail:
> users-help@httpd.apache.org
> 
> 
>
---------------------------------------------------------------------
> The official User-To-User support forum of the
> Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for
> more info.
> To unsubscribe, e-mail:
> users-unsubscribe@httpd.apache.org
>    "   from the digest:
> users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail:
> users-help@httpd.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] equivalent?

Posted by Jeff Cohen <su...@gej-it.com>.
Both Vhsots are not valid, but the first made more sense to me.
They should look like that:
** notice the ServerName directive.

<VirtualHost *>
        ServerAdmin webmaster@myserver.com
        ServerName www.myserver1.com
        DocumentRoot /var/www/html
        Options Indexes
        <Directory /var/www/html>
          AllowOverride AuthConfig FileInfo Limit
          Order allow,deny
          Allow from all
        </Directory>
</VirtualHost>

<VirtualHost *>
        ServerAdmin webmaster@myserver.com
        ServerName www.myserver2.com
        DocumentRoot /var/www/html
        Options Indexes
        <Directory /var/www/html>
          AllowOverride AuthConfig FileInfo Limit
          Order allow,deny
          Allow from all
        </Directory>
</VirtualHost>

All the best,
Jeff Cohen
Support@GEJ-IT.com
Tel. (416) 917-2324
www.GEJ-IT.com
GEJ-IT Networks!



> -----Original Message-----
> From: Stand H [mailto:hstandit@yahoo.com]
> Sent: Thursday, July 24, 2003 1:04 AM
> To: users@httpd.apache.org
> Subject: [users@httpd] equivalent?
> 
> Hi,
> 
> Are the two config equivent?
> 
> <VirtualHost www.myserver.com>
>         ServerAdmin webmaster@myserver.com
>         ServerName www.myserver.com
>         DocumentRoot /var/www/html
>         Options Indexes
>         <Directory "/var/www/html">
>                 AllowOverride AuthConfig FileInfo
> Limit
>                 Order allow,deny
>                 Allow from all
>         </Directory>
> </VirtualHost>
> 
> 
> <VirtualHost www.myserver.com>
>         ServerAdmin webmaster@myserver.com
>         ServerName www.myserver.com
>         DocumentRoot /var/www/html
>         Options Indexes
>         AllowOverride AuthConfig FileInfo Limit
>         Order allow,deny
>         Allow from all
> </VirtualHost>
> 
> Thanks,
> 
> Stand
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org