You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Rich Bowen <rb...@rcbowen.com> on 2003/06/02 13:32:41 UTC

Re: [users@httpd] .htaccess is not getting parsed!

On Mon, 2 Jun 2003, Mukta A. Telang wrote:

> Hi,
> I want to install phpPgAdmin and dont want other users to be able to
> access files from my public_html directory.
>
> I could not find access.conf file but found AllowOveride directive for
> .htaccess file in httpd.conf file. So I set it to:
>
> AllowOverride Authconfig
>
> In the .htaccess file I placed following lines:
>
> AuthName "restricted stuff"
> AuthType Basic
> AuthUserFile /usr/local/etc/httpd/users
> require valid-user
>
> And restarted apache...
> but did not get the expected...

Several things could be happening here.

1) The most likely, the AllowOverride is not in the right scope. Make
sure that the AllowOverride refers to the directory that you are
actually working with. It will likely be in a container that looks like:
<Directory /home/*/public_html>

2) The .htaccess file is not readable by the Apache user. (Usually
'nobody' or 'apache'. See the User directive for more details.)

-- 
Oh I have slipped the surly bonds of earth
And danced the sky on laughter-silvered wings
 --High Flight (John Gillespie Magee)

---------------------------------------------------------------------
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 is not getting parsed!

Posted by Rich Bowen <rb...@rcbowen.com>.
On Tue, 3 Jun 2003, Mukta A. Telang wrote:

> Hi,
> I am new to apache..
> I could not understand the tips that you have given..
>
> >
> > 1) The most likely, the AllowOverride is not in the right scope. Make
> > sure that the AllowOverride refers to the directory that you are
> > actually working with. It will likely be in a container that looks like:
> > <Directory /home/*/public_html>
>
> which directive determines the scope of "AllowOverride" ?
> I found following COMMENTED lines in httpd.conf:
>
> # Control access to UserDir directories.  The following is an example
> # for a site where these directories are restricted to read-only.
> #
> #<Directory /home/*/public_html>
> #    AllowOverride FileInfo AuthConfig Limit
> #    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
> #    <Limit GET POST OPTIONS PROPFIND>
> #        Order allow,deny
> #        Allow from all
> #    </Limit>
> #    <LimitExcept GET POST OPTIONS PROPFIND>
> #        Order deny,allow
> #        Deny from all
> #    </LimitExcept>
> #</Directory>
>
> Is this what you were refering to?
That particular AllowOverride directive (if it was not commented out, of
course) would be in effect in the scope of <Directory
/home/*/public_html> - ie, all directories that match that pattern.

By scope, I mean what <Location> or <Directory> or <Files> section the
directive is located in, and whether this applies to the files or
directory that you are working with.

> > 2) The .htaccess file is not readable by the Apache user. (Usually
> > 'nobody' or 'apache'. See the User directive for more details.)
> >
>
> Apache user in my case is nobody.
> I have made .htaccess readable by everyone by giving:
> chmod ugo+r .htaccess
> still the problem persists..
> What should I do?

If you would like to put your configuration file on your web site and
send me the URL, I'd be glad to look through it and give you hints as to
where the problem may lie. You'll also need to remind me where the
.htaccess file is placed (ie, what directory it lives in) as I have
deleted the earlier email messages.

-- 
Rich Bowen - rbowen@rcbowen.com
... and another brother out of his mind, and another brother out at New
York (not the same, though it might appear so)
	Somebody's Luggage (Charles Dickens)

---------------------------------------------------------------------
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 is not getting parsed!

Posted by "Mukta A. Telang" <mu...@darya.nio.org>.
Hi,
I am new to apache..
I could not understand the tips that you have given..

> 
> 1) The most likely, the AllowOverride is not in the right scope. Make
> sure that the AllowOverride refers to the directory that you are
> actually working with. It will likely be in a container that looks like:
> <Directory /home/*/public_html>

which directive determines the scope of "AllowOverride" ?
I found following COMMENTED lines in httpd.conf:

# Control access to UserDir directories.  The following is an example
# for a site where these directories are restricted to read-only.
#
#<Directory /home/*/public_html>
#    AllowOverride FileInfo AuthConfig Limit
#    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
#    <Limit GET POST OPTIONS PROPFIND>
#        Order allow,deny
#        Allow from all
#    </Limit>
#    <LimitExcept GET POST OPTIONS PROPFIND>
#        Order deny,allow
#        Deny from all
#    </LimitExcept>
#</Directory>

Is this what you were refering to?
B 
> 
> 2) The .htaccess file is not readable by the Apache user. (Usually
> 'nobody' or 'apache'. See the User directive for more details.)
>

Apache user in my case is nobody.
I have made .htaccess readable by everyone by giving:
chmod ugo+r .htaccess
still the problem persists..
What should I do?
Please help,
Mukta


---------------------------------------------------------------------
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