You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jordan Thompson <Jo...@ThompCo.com> on 2002/12/01 20:38:14 UTC

[users@httpd] confused with directory permissions

Hi All,
I am a little (a lot) confused on how to set up my .access files and how to
use them.
What I would like to be able to do is let anyone go to a directory *unless*
I have a .access file in it.  in which case, I'd like to apply the
restrictions in that file.

Here is the relative (I think) section of my commonhttpd.conf file:

<Directory />
  Options -Indexes FollowSymLinks
  AllowOverride None
  Options +Indexes
</Directory>


thanks for your help,
Jordan


---------------------------------------------------------------------
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] confused with directory permissions

Posted by "J. Greenlees" <ja...@shaw.ca>.
actually my mistake, it's var/www/html with 9.0

J. Greenlees wrote:
> Jordan,
> are you sure it's var/www/httpd and not var/www/http ?
> my Mandrake 9 box is the latter.
> 
> Jordan Thompson wrote:
> 
>> WAITASEC... I guess I didn't hit refresh - Now, when I try to access the
>> directory, I get an Internal Server Error.  This is a little 
>> better...  Here
>> is my .htaccess file:
>>
>> AuthName "ViaSat Downloads"
>>   AuthType Basic
>>   AuthUserFile /var/www/httpd/viasat.users
>>
>>   require valid-user
>>
>>
>> Once again, this *used* to work.  I checked the path to viasat.users is
>> valid.
>>
>> thanks,
>> Jordan
>> ----- Original Message -----
>> From: "Jordan Thompson" <Jo...@ThompCo.com>
>> To: <us...@httpd.apache.org>
>> Sent: Sunday, December 01, 2002 3:59 PM
>> Subject: Re: [users@httpd] confused with directory permissions
>>
>>
>>
>>> ----- Original Message -----
>>> From: "Chris Meadors" <cl...@hereintown.net>
>>> To: <us...@httpd.apache.org>
>>> Sent: Sunday, December 01, 2002 3:55 PM
>>> Subject: Re: [users@httpd] confused with directory permissions
>>>
>>>
>>>
>>>> Don't worry about the <Location /> stuff now that you found your
>>>> DocumentRoot.  Now you just need the <Directory "/var/www/html">
>>>> directive.  Go and make the changes I said in my first e-mail to that
>>>> part of the conf.
>>>
>>>
>>> So my commonhttpd.conf should contain:
>>>
>>> <Directory />
>>>  Options FollowSymLinks
>>>  AllowOverride None
>>> </Directory>
>>>
>>> <Directory /var/www/html>
>>>  Options +Indexes
>>>  AllowOverride Options
>>> </Directory>
>>>
>>> I think that is what you were saying.
>>>
>>> thanks,
>>> Jordan
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
> 
> 
> 
> ---------------------------------------------------------------------
> 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


Re: [users@httpd] confused with directory permissions

Posted by Jordan Thompson <Jo...@ThompCo.com>.
----- Original Message -----
From: "J. Greenlees" <ja...@shaw.ca>
To: <us...@httpd.apache.org>
Sent: Sunday, December 01, 2002 4:12 PM
Subject: Re: [users@httpd] confused with directory permissions


> Jordan,
> are you sure it's var/www/httpd and not var/www/http ?
> my Mandrake 9 box is the latter.

my  root is http, but my auth files (for .htaccess files) are in httpd.


I just checked my logs and am getting this error:
[Sun Dec  1 16:16:48 2002] [alert] [client 192.168.1.1]
/var/www/html/viasat/.htaccess: AuthName not allowed here

this is my .htaccess file:

AuthName "ViaSat Downloads"
  AuthType Basic
  AuthUserFile /var/www/httpd/viasat.users

  require valid-user

It used to work on older versions of apache.

thanks,
Jordan
>
> Jordan Thompson wrote:
> > WAITASEC... I guess I didn't hit refresh - Now, when I try to access the
> > directory, I get an Internal Server Error.  This is a little better...
Here
> > is my .htaccess file:
> >
> > AuthName "ViaSat Downloads"
> >   AuthType Basic
> >   AuthUserFile /var/www/httpd/viasat.users
> >
> >   require valid-user
> >
> >
> > Once again, this *used* to work.  I checked the path to viasat.users is
> > valid.
> >
> > thanks,
> > Jordan
> > ----- Original Message -----
> > From: "Jordan Thompson" <Jo...@ThompCo.com>
> > To: <us...@httpd.apache.org>
> > Sent: Sunday, December 01, 2002 3:59 PM
> > Subject: Re: [users@httpd] confused with directory permissions
> >
> >
> >
> >>----- Original Message -----
> >>From: "Chris Meadors" <cl...@hereintown.net>
> >>To: <us...@httpd.apache.org>
> >>Sent: Sunday, December 01, 2002 3:55 PM
> >>Subject: Re: [users@httpd] confused with directory permissions
> >>
> >>
> >>
> >>>Don't worry about the <Location /> stuff now that you found your
> >>>DocumentRoot.  Now you just need the <Directory "/var/www/html">
> >>>directive.  Go and make the changes I said in my first e-mail to that
> >>>part of the conf.
> >>
> >>So my commonhttpd.conf should contain:
> >>
> >><Directory />
> >>  Options FollowSymLinks
> >>  AllowOverride None
> >></Directory>
> >>
> >><Directory /var/www/html>
> >>  Options +Indexes
> >>  AllowOverride Options
> >></Directory>
> >>
> >>I think that is what you were saying.
> >>
> >>thanks,
> >>Jordan
> >>
> >>---------------------------------------------------------------------
> >>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
> >
> >
>
>
>
> ---------------------------------------------------------------------
> 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


Re: [users@httpd] confused with directory permissions

Posted by "J. Greenlees" <ja...@shaw.ca>.
Jordan,
are you sure it's var/www/httpd and not var/www/http ?
my Mandrake 9 box is the latter.

Jordan Thompson wrote:
> WAITASEC... I guess I didn't hit refresh - Now, when I try to access the
> directory, I get an Internal Server Error.  This is a little better...  Here
> is my .htaccess file:
> 
> AuthName "ViaSat Downloads"
>   AuthType Basic
>   AuthUserFile /var/www/httpd/viasat.users
> 
>   require valid-user
> 
> 
> Once again, this *used* to work.  I checked the path to viasat.users is
> valid.
> 
> thanks,
> Jordan
> ----- Original Message -----
> From: "Jordan Thompson" <Jo...@ThompCo.com>
> To: <us...@httpd.apache.org>
> Sent: Sunday, December 01, 2002 3:59 PM
> Subject: Re: [users@httpd] confused with directory permissions
> 
> 
> 
>>----- Original Message -----
>>From: "Chris Meadors" <cl...@hereintown.net>
>>To: <us...@httpd.apache.org>
>>Sent: Sunday, December 01, 2002 3:55 PM
>>Subject: Re: [users@httpd] confused with directory permissions
>>
>>
>>
>>>Don't worry about the <Location /> stuff now that you found your
>>>DocumentRoot.  Now you just need the <Directory "/var/www/html">
>>>directive.  Go and make the changes I said in my first e-mail to that
>>>part of the conf.
>>
>>So my commonhttpd.conf should contain:
>>
>><Directory />
>>  Options FollowSymLinks
>>  AllowOverride None
>></Directory>
>>
>><Directory /var/www/html>
>>  Options +Indexes
>>  AllowOverride Options
>></Directory>
>>
>>I think that is what you were saying.
>>
>>thanks,
>>Jordan
>>
>>---------------------------------------------------------------------
>>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
> 
> 



---------------------------------------------------------------------
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] confused with directory permissions

Posted by Chris Jones <cj...@cr-jay.ca>.
Wow, what great assistance.  My compliments. I have been subscribed for 3 
days.  That was a great thread.


>Yes, trying to restart Apache with an error in the config file will cause 
>it to die.  I always run "apachectl configtest" before I restart it.
>
>So, back to your commonhttpd.conf.  Again find the <Directory ...> 
>statement for your DocumentRoot.  Within that directive look for an 
>AllowOverride line.  Make that line say, "AllowOverride Options 
>AuthConfig".  Restart and that should be it.
>
>--
>Chris
>
>
>---------------------------------------------------------------------
>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


Re: [users@httpd] confused with directory permissions

Posted by Jordan Thompson <Jo...@ThompCo.com>.
Yes, yes, yes!!!

Chris, thank you very much for your time and patience.  I really appreciate
it.

Jordan
----- Original Message -----
From: "Chris Meadors" <cl...@hereintown.net>
To: <us...@httpd.apache.org>
Sent: Sunday, December 01, 2002 11:57 PM
Subject: Re: [users@httpd] confused with directory permissions


> Jordan Thompson wrote:
> > don't know for sure - perhaps not as I would assume that apache would
have
> > caught the type-o you pointed out.
>
> Yes, trying to restart Apache with an error in the config file will
> cause it to die.  I always run "apachectl configtest" before I restart it.
>
> So, back to your commonhttpd.conf.  Again find the <Directory ...>
> statement for your DocumentRoot.  Within that directive look for an
> AllowOverride line.  Make that line say, "AllowOverride Options
> AuthConfig".  Restart and that should be it.
>
> --
> Chris
>
>
> ---------------------------------------------------------------------
> 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


Re: [users@httpd] confused with directory permissions

Posted by Chris Meadors <cl...@hereintown.net>.
Jordan Thompson wrote:
> don't know for sure - perhaps not as I would assume that apache would have
> caught the type-o you pointed out.

Yes, trying to restart Apache with an error in the config file will 
cause it to die.  I always run "apachectl configtest" before I restart it.

So, back to your commonhttpd.conf.  Again find the <Directory ...> 
statement for your DocumentRoot.  Within that directive look for an 
AllowOverride line.  Make that line say, "AllowOverride Options 
AuthConfig".  Restart and that should be it.

-- 
Chris


---------------------------------------------------------------------
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] confused with directory permissions

Posted by Jordan Thompson <Jo...@ThompCo.com>.
<SNIP>
> but access.conf is not a default file with my installation.

I did have an access.conf, but everything was commented out.

> as a matter of fact I don't have an access.conf for apache and my apache
> running just fine.

<SNIP>

> > Wait, access.conf?  Where in that file did you add this line (what are
> > the surrounding lines, and especially what directory is it applied to)?
> >  Also do you know for a fact that access.conf is included in the
> > commonhttp.conf or what ever your main .conf file is?

don't know for sure - perhaps not as I would assume that apache would have
caught the type-o you pointed out.

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


Re: [users@httpd] confused with directory permissions

Posted by "J. Greenlees" <ja...@shaw.ca>.
Chris,
mandrake uses httpd.conf,
which includes commonhttpd.conf
httpd-perl.conf ( if installed)
php.conf (if installed)
proxied_handlers.pl
mod_ssl.conf
ssl.default-vhost.conf

but access.conf is not a default file with my installation.
as a matter of fact I don't have an access.conf for apache and my apache 
running just fine.
( be default it not allowing indexes ~g~ )

though I haven't made a lot of customisation to the conf.


Chris Meadors wrote:
> Jordan Thompson wrote:
> 
>> My log says:
>> [Sun Dec  1 16:20:17 2002] [alert] [client 192.168.1.1]
>> /var/www/html/viasat/.htaccess: AuthName not allowed here
>>
>> What does this mean?
>>
>> Here is my .htaccess file:
>> AuthName "ViaSat Downloads"
>>   AuthType Basic
>>   AuthUserFile /var/www/httpd/viasat.users
>>
>>   require valid-user
>>
>> I dug a little more and found my access.conf.  I added the line:
>> AllowOverride AthConfig
> 
> 
> Wait, access.conf?  Where in that file did you add this line (what are 
> the surrounding lines, and especially what directory is it applied to)? 
>  Also do you know for a fact that access.conf is included in the 
> commonhttp.conf or what ever your main .conf file is?
> 



---------------------------------------------------------------------
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] confused with directory permissions

Posted by Chris Meadors <cl...@hereintown.net>.
Jordan Thompson wrote:
> My log says:
> [Sun Dec  1 16:20:17 2002] [alert] [client 192.168.1.1]
> /var/www/html/viasat/.htaccess: AuthName not allowed here
> 
> What does this mean?
> 
> Here is my .htaccess file:
> AuthName "ViaSat Downloads"
>   AuthType Basic
>   AuthUserFile /var/www/httpd/viasat.users
> 
>   require valid-user
> 
> I dug a little more and found my access.conf.  I added the line:
> AllowOverride AthConfig

Wait, access.conf?  Where in that file did you add this line (what are 
the surrounding lines, and especially what directory is it applied to)? 
  Also do you know for a fact that access.conf is included in the 
commonhttp.conf or what ever your main .conf file is?

-- 
Chris


---------------------------------------------------------------------
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] confused with directory permissions

Posted by Jordan Thompson <Jo...@ThompCo.com>.
> > My log says:
> > [Sun Dec  1 16:20:17 2002] [alert] [client 192.168.1.1]
> > /var/www/html/viasat/.htaccess: AuthName not allowed here
> >
> > What does this mean?
> >
> > Here is my .htaccess file:
> > AuthName "ViaSat Downloads"
> >   AuthType Basic
> >   AuthUserFile /var/www/httpd/viasat.users
> >
> >   require valid-user
> >
> > I dug a little more and found my access.conf.  I added the line:
> > AllowOverride AthConfig
>
> AthConfig or AuthConfig?

absoulutely right - caught a type-o first time *ever*... *really* ;-)

>
> You are probably going to want it to actually read:
>
> AllowOverride Options AuthConfig

Done.  Restarted apache and got the same error on both the browser and the
log file.

>
> (the Options part allows you to set the Indexes option in the .htaccess)
>
> > It still does not prompt me for a username/password when I try to access
the
> > directory with the .htaccess file (it just gives me the internal server
> > error above.)
>
> It won't prompt you until the .htaccess file can be parsed correctly.

I'm working on that! :-)


thanks again for your help Chris,

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


Re: [users@httpd] confused with directory permissions

Posted by Chris Meadors <cl...@hereintown.net>.
Jordan Thompson wrote:

> My log says:
> [Sun Dec  1 16:20:17 2002] [alert] [client 192.168.1.1]
> /var/www/html/viasat/.htaccess: AuthName not allowed here
> 
> What does this mean?
> 
> Here is my .htaccess file:
> AuthName "ViaSat Downloads"
>   AuthType Basic
>   AuthUserFile /var/www/httpd/viasat.users
> 
>   require valid-user
> 
> I dug a little more and found my access.conf.  I added the line:
> AllowOverride AthConfig

AthConfig or AuthConfig?

You are probably going to want it to actually read:

AllowOverride Options AuthConfig

(the Options part allows you to set the Indexes option in the .htaccess)

> It still does not prompt me for a username/password when I try to access the
> directory with the .htaccess file (it just gives me the internal server
> error above.)

It won't prompt you until the .htaccess file can be parsed correctly.

-- 
Chris


---------------------------------------------------------------------
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] confused with directory permissions

Posted by Jordan Thompson <Jo...@ThompCo.com>.
> > WAITASEC... I guess I didn't hit refresh - Now, when I try to access the
> > directory, I get an Internal Server Error.  This is a little better...
My log says:
[Sun Dec  1 16:20:17 2002] [alert] [client 192.168.1.1]
/var/www/html/viasat/.htaccess: AuthName not allowed here

What does this mean?

Here is my .htaccess file:
AuthName "ViaSat Downloads"
  AuthType Basic
  AuthUserFile /var/www/httpd/viasat.users

  require valid-user

I dug a little more and found my access.conf.  I added the line:
AllowOverride AthConfig

It still does not prompt me for a username/password when I try to access the
directory with the .htaccess file (it just gives me the internal server
error above.)

thanks,
Jordan
>
> What directory is giving you the error?  I didn't know you were also
> doing authentication.  You'll probably want to change your AllowOverride
> to "All" or include "Auth" with the "Options".
>
> Anyway the best thing to do when you see a server error is to look at
> the error log.  I don't know where it is on your machine, you can look
> in the httpd.conf.  When you find it, "tail error_log" will give you the
> last few lines.
>
> --
> Chris
>
>
> ---------------------------------------------------------------------
> 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


Re: [users@httpd] confused with directory permissions

Posted by Chris Meadors <cl...@hereintown.net>.
Jordan Thompson wrote:
> WAITASEC... I guess I didn't hit refresh - Now, when I try to access the
> directory, I get an Internal Server Error.  This is a little better...  Here
> is my .htaccess file:

What directory is giving you the error?  I didn't know you were also 
doing authentication.  You'll probably want to change your AllowOverride 
to "All" or include "Auth" with the "Options".

Anyway the best thing to do when you see a server error is to look at 
the error log.  I don't know where it is on your machine, you can look 
in the httpd.conf.  When you find it, "tail error_log" will give you the 
last few lines.

-- 
Chris


---------------------------------------------------------------------
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] confused with directory permissions

Posted by Jordan Thompson <Jo...@ThompCo.com>.
WAITASEC... I guess I didn't hit refresh - Now, when I try to access the
directory, I get an Internal Server Error.  This is a little better...  Here
is my .htaccess file:

AuthName "ViaSat Downloads"
  AuthType Basic
  AuthUserFile /var/www/httpd/viasat.users

  require valid-user


Once again, this *used* to work.  I checked the path to viasat.users is
valid.

thanks,
Jordan
----- Original Message -----
From: "Jordan Thompson" <Jo...@ThompCo.com>
To: <us...@httpd.apache.org>
Sent: Sunday, December 01, 2002 3:59 PM
Subject: Re: [users@httpd] confused with directory permissions


> ----- Original Message -----
> From: "Chris Meadors" <cl...@hereintown.net>
> To: <us...@httpd.apache.org>
> Sent: Sunday, December 01, 2002 3:55 PM
> Subject: Re: [users@httpd] confused with directory permissions
>
>
> > Don't worry about the <Location /> stuff now that you found your
> > DocumentRoot.  Now you just need the <Directory "/var/www/html">
> > directive.  Go and make the changes I said in my first e-mail to that
> > part of the conf.
>
> So my commonhttpd.conf should contain:
>
> <Directory />
>   Options FollowSymLinks
>   AllowOverride None
> </Directory>
>
> <Directory /var/www/html>
>   Options +Indexes
>   AllowOverride Options
> </Directory>
>
> I think that is what you were saying.
>
> thanks,
> Jordan
>
> ---------------------------------------------------------------------
> 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


Re: [users@httpd] confused with directory permissions

Posted by Jordan Thompson <Jo...@ThompCo.com>.
Hi Chris,
thanks very much for your help.  This is is really frustrating for me as it
used to work before I reinstalled the latest version of Mandrake.  Now it
seems I need to relearn everything all over again!

So far so good (it still works the way it supposed to) but, my .htaccess has
no effect on the directory it is in.

thanks again,
Jordan


----- Original Message -----
From: "Jordan Thompson" <Jo...@ThompCo.com>
To: <us...@httpd.apache.org>
Sent: Sunday, December 01, 2002 3:59 PM
Subject: Re: [users@httpd] confused with directory permissions


> ----- Original Message -----
> From: "Chris Meadors" <cl...@hereintown.net>
> To: <us...@httpd.apache.org>
> Sent: Sunday, December 01, 2002 3:55 PM
> Subject: Re: [users@httpd] confused with directory permissions
>
>
> > Don't worry about the <Location /> stuff now that you found your
> > DocumentRoot.  Now you just need the <Directory "/var/www/html">
> > directive.  Go and make the changes I said in my first e-mail to that
> > part of the conf.
>
> So my commonhttpd.conf should contain:
>
> <Directory />
>   Options FollowSymLinks
>   AllowOverride None
> </Directory>
>
> <Directory /var/www/html>
>   Options +Indexes
>   AllowOverride Options
> </Directory>
>
> I think that is what you were saying.
>
> thanks,
> Jordan
>
> ---------------------------------------------------------------------
> 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


Re: [users@httpd] confused with directory permissions

Posted by Jordan Thompson <Jo...@ThompCo.com>.
----- Original Message ----- 
From: "Chris Meadors" <cl...@hereintown.net>
To: <us...@httpd.apache.org>
Sent: Sunday, December 01, 2002 3:55 PM
Subject: Re: [users@httpd] confused with directory permissions


> Don't worry about the <Location /> stuff now that you found your
> DocumentRoot.  Now you just need the <Directory "/var/www/html">
> directive.  Go and make the changes I said in my first e-mail to that
> part of the conf.

So my commonhttpd.conf should contain:

<Directory />
  Options FollowSymLinks
  AllowOverride None
</Directory>

<Directory /var/www/html>
  Options +Indexes
  AllowOverride Options
</Directory>

I think that is what you were saying.

thanks,
Jordan

---------------------------------------------------------------------
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] confused with directory permissions

Posted by Chris Meadors <cl...@hereintown.net>.
Jordan Thompson wrote:

> I hope I don't sound stupid, but I can't find that either.  Is this supposed
> to be in commonhttpd.conf?

I don't know what your distro did to the Apache's default conf files,
but I've just been assuming that commonhttpd.conf contains most of the
default httpd.conf stuff, and that it probably just includes other files
for virtual hosts or something.  This seems to be correct.

> I did find:
> DocumentRoot /var/www/html
> in httpd.conf, but no <Location /> anywhere.

Don't worry about the <Location /> stuff now that you found your
DocumentRoot.  Now you just need the <Directory "/var/www/html">
directive.  Go and make the changes I said in my first e-mail to that
part of the conf.

-- 
Chris


---------------------------------------------------------------------
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] confused with directory permissions

Posted by Jordan Thompson <Jo...@ThompCo.com>.
----- Original Message -----
From: "Chris Meadors" <cl...@hereintown.net>
To: <us...@httpd.apache.org>
Sent: Sunday, December 01, 2002 3:27 PM
Subject: Re: [users@httpd] confused with directory permissions


> Jordan Thompson wrote:
>
> > I don't have anything like this.  I assume it would be in the
> > commonhttpd.conf file?
>
> Well look to see what your "DocumentRoot" is pointing to.  Then find the
> matching "Directory" tag.  In a pinch you could use:
>
> <Location />
> ...
> </Location>

I hope I don't sound stupid, but I can't find that either.  Is this supposed
to be in commonhttpd.conf?

I did find:
DocumentRoot /var/www/html
in httpd.conf, but no <Location /> anywhere.

thanks,
Jordan
>
> > Would this work even if I want to allow access to indexes without the
> > .htaccess file?  Remember I only want o mess with the .access file in
those
> > (rare) cases that I want to restrict access.
>
> That is *exactly* what it would do.
>
> --
> Chris
>
>
> ---------------------------------------------------------------------
> 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


Re: [users@httpd] confused with directory permissions

Posted by Chris Meadors <cl...@hereintown.net>.
Jordan Thompson wrote:

> I don't have anything like this.  I assume it would be in the
> commonhttpd.conf file?

Well look to see what your "DocumentRoot" is pointing to.  Then find the 
matching "Directory" tag.  In a pinch you could use:

<Location />
...
</Location>

> Would this work even if I want to allow access to indexes without the
> .htaccess file?  Remember I only want o mess with the .access file in those
> (rare) cases that I want to restrict access.

That is *exactly* what it would do.

-- 
Chris


---------------------------------------------------------------------
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] confused with directory permissions

Posted by Jordan Thompson <Jo...@ThompCo.com>.
----- Original Message -----
From: "Chris Meadors" <cl...@hereintown.net>
To: <us...@httpd.apache.org>
Sent: Sunday, December 01, 2002 3:04 PM
Subject: Re: [users@httpd] confused with directory permissions


> Jordan Thompson wrote:
> > Hi All,
> > I am a little (a lot) confused on how to set up my .access files and how
to
> > use them.
> > What I would like to be able to do is let anyone go to a directory
*unless*
> > I have a .access file in it.  in which case, I'd like to apply the
> > restrictions in that file.
> >

<SNIP>
>
> No, change that back to:
>
> <Directory />
>      Options FollowSymLinks
>      AllowOverride None
> </Directory>
>
> What you are looking for is the Directory setting for your DocumentRoot,
> usually <Directory "/usr/local/apache2/htdocs">.

I don't have anything like this.  I assume it would be in the
commonhttpd.conf file?

>
> That you want to look something like:
>
> <Directory "/usr/local/apache2/htdocs">
>      Options +Indexes
>      AllowOverride Options
> </Directory>
>
> Then you can put "Options -Indexes", in your .htaccess file.

Would this work even if I want to allow access to indexes without the
.htaccess file?  Remember I only want o mess with the .access file in those
(rare) cases that I want to restrict access.

thanks
Jordan


---------------------------------------------------------------------
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] confused with directory permissions

Posted by Chris Meadors <cl...@hereintown.net>.
Jordan Thompson wrote:
> Hi All,
> I am a little (a lot) confused on how to set up my .access files and how to
> use them.
> What I would like to be able to do is let anyone go to a directory *unless*
> I have a .access file in it.  in which case, I'd like to apply the
> restrictions in that file.
> 
> Here is the relative (I think) section of my commonhttpd.conf file:
> 
> <Directory />
>   Options -Indexes FollowSymLinks
>   AllowOverride None
>   Options +Indexes
> </Directory>

No, change that back to:

<Directory />
     Options FollowSymLinks
     AllowOverride None
</Directory>

What you are looking for is the Directory setting for your DocumentRoot, 
usually <Directory "/usr/local/apache2/htdocs">.

That you want to look something like:

<Directory "/usr/local/apache2/htdocs">
     Options +Indexes
     AllowOverride Options
</Directory>

Then you can put "Options -Indexes", in your .htaccess file.

-- 
Chris


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