You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Christoph P. Kukulies" <ku...@kukulies.org> on 2007/05/01 10:30:41 UTC

[users@httpd] .htaccess not for all hosts (VirtualHosts)

I'm running apache 1.3.28 which serves the outside (Internet) network
and an Intranet (through address 192.168.1.x)

To the outside server I'm using .htaccess password protected pages
while I would like to open the pages to the Intranet.

At the end of httpd.conf I have this:

#
<VirtualHost 192.168.1.116:80>
ServerAlias foruminternal.mysite.net
ServerAdmin info@mysite.de
<Directory "/usr/local/www/data">
Options -Indexes -FollowSymlinks
order allow,deny
Allow from 192.168.1.
AllowOverride None
</Directory>

Outside of this VirtualHost section I have the Webserver to
the Internet defined as follows:

-------------------------- excerpt of httpd.conf ----------------------------
# machine always knows itself by this address. If you use Apache strictly for
# local testing and development, you may use 127.0.0.1 as the server name.
#
ServerName forum.mysite.de
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/usr/local/www/data"

#
# Each directory to which Apache has access, can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# permissions.
#
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#<Directory "/usr/local/www/data">


#
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
    Options Indexes FollowSymLinks MultiViews

#
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
#    AllowOverride None
    AllowOverride All

#
# Controls who can get stuff from this server.
#
    Order allow,deny
    Allow from all
</Directory>

----------------------- End of httpd.conf excerpt --------

Can anyone lead me to the solution?

Thank you,


--
Chris Christoph P. U. Kukulies kuku_at_kukulies.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


Re: [users@httpd] .htaccess not for all hosts (VirtualHosts)

Posted by "Christoph P. Kukulies" <ku...@kukulies.org>.
On Tue, May 01, 2007 at 12:46:41PM -0400, Joshua Slive wrote:
> On 5/1/07, Christoph P. Kukulies <ku...@kukulies.org> wrote:
> 
> >Thanks, I added it but it doesn't work. I put it before the AllowOverride 
> >None.
> 
> Are you really sure about what interface the different clients are
> coming in on? The standard solution is to throw out the separate
> virtualhost (which doesn't seem to be capturing any requests) and put
> that same <Directory> section in the main server config. With the
> Satisfy any, it should work fine.

Yeah, you could be right, regarding the interface. I will follow the other
solution, putting it in the main section and taking out the VirtualHost.

Thanks.

--
Chris Christoph P. U. Kukulies kuku_at_kukulies.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


Re: [users@httpd] .htaccess not for all hosts (VirtualHosts)

Posted by Joshua Slive <jo...@slive.ca>.
On 5/1/07, Christoph P. Kukulies <ku...@kukulies.org> wrote:

> Thanks, I added it but it doesn't work. I put it before the AllowOverride None.

Are you really sure about what interface the different clients are
coming in on? The standard solution is to throw out the separate
virtualhost (which doesn't seem to be capturing any requests) and put
that same <Directory> section in the main server config. With the
Satisfy any, it should work fine.

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] .htaccess not for all hosts (VirtualHosts)

Posted by "Christoph P. Kukulies" <ku...@kukulies.org>.
On Tue, May 01, 2007 at 09:21:22AM -0400, Joshua Slive wrote:
> On 5/1/07, Christoph P. Kukulies <ku...@kukulies.org> wrote:
> >I'm running apache 1.3.28 which serves the outside (Internet) network
> >and an Intranet (through address 192.168.1.x)
> >
> >To the outside server I'm using .htaccess password protected pages
> >while I would like to open the pages to the Intranet.
> >
> >At the end of httpd.conf I have this:
> >
> >#
> ><VirtualHost 192.168.1.116:80>
> >ServerAlias foruminternal.mysite.net
> >ServerAdmin info@mysite.de
> ><Directory "/usr/local/www/data">
> >Options -Indexes -FollowSymlinks
> >order allow,deny
> >Allow from 192.168.1.
> >AllowOverride None
> ></Directory>
> 
> Add
> Satisfy Any
> to the above Directory block.

Thanks, I added it but it doesn't work. I put it before the AllowOverride None.
Does the position matter?

--
Chris Christoph P. U. Kukulies kuku_at_kukulies.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


Re: [users@httpd] .htaccess not for all hosts (VirtualHosts)

Posted by Joshua Slive <jo...@slive.ca>.
On 5/1/07, Christoph P. Kukulies <ku...@kukulies.org> wrote:
> I'm running apache 1.3.28 which serves the outside (Internet) network
> and an Intranet (through address 192.168.1.x)
>
> To the outside server I'm using .htaccess password protected pages
> while I would like to open the pages to the Intranet.
>
> At the end of httpd.conf I have this:
>
> #
> <VirtualHost 192.168.1.116:80>
> ServerAlias foruminternal.mysite.net
> ServerAdmin info@mysite.de
> <Directory "/usr/local/www/data">
> Options -Indexes -FollowSymlinks
> order allow,deny
> Allow from 192.168.1.
> AllowOverride None
> </Directory>

Add
Satisfy Any
to the above Directory block.

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