You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Nando Ronsisvalle <ro...@merimp.com> on 2007/02/13 18:00:21 UTC

[users@httpd] mod_authz_host problem

Hi
i'm setting access control on a fresh installed apache 2.2.4 linux box.
Setting on a sub-directory this directive:
Order deny,allow
deny from all

doesn't work.
What am i wrong?

this is a part of my http.conf
DocumentRoot "/home/www/htdocs"

#
# 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
# features. 
#
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</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 "/home/www/htdocs">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI 
MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess 
files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None

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

</Directory>


and this of httpd-vhosts.conf:

<VirtualHost _default_:80>
    ServerAdmin xx@xxxxxxx.xxx
    DocumentRoot /home/www/xxxxxx/htdocs
    ServerName www.xxxxxxx.xxx
    ServerAlias www.xxxxxxx.xxx
    ErrorLog /home/www/xxxxx/logs/xxxx-error.log
    CustomLog /home/www/xxxxx/logs/xxxxx-access.log combined
    <Directory />
        Options FollowSymlinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

    <Directory /myadm>
        Options FollowSymlinks
        AllowOverride None
        Order deny,allow
        Deny from all
    </Directory>
</VirtualHost>

i did setup .htaccess too but the result is the same.
I want to limit access to a myphpadmin sub-directory only to clients of 
192.168.0.0/24 subnet but i don't understand how.

Thanks

NR


---------------------------------------------------------------------
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] mod_authz_host problem

Posted by Nando Ronsisvalle <ro...@merimp.com>.
Joshua Slive ha scritto:
> Directory takes a full path relative to the root of the filesystem,
> not relative to the DocumentRoot.
>
> See:
> http://httpd.apache.org/docs/2.2/sections.html#file-and-web
>
> Joshua.
Ok! Now works right. I find another error on AllowOverride directive. I 
setted "none" parameter then any .htaccess file was ignored.
Now i set AllowOverride on All and everything works good.
Thanks a lot for your help.

NR


---------------------------------------------------------------------
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] mod_authz_host problem

Posted by Joshua Slive <jo...@slive.ca>.
On 2/13/07, Nando Ronsisvalle <ro...@merimp.com> wrote:

>     <Directory /myadm>

Directory takes a full path relative to the root of the filesystem,
not relative to the DocumentRoot.

See:
http://httpd.apache.org/docs/2.2/sections.html#file-and-web

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