Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

authorisation fails to work - really confused!

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Suggestions for configuration  
Author Message
user2359

External


Since: Jul 05, 2003
Posts: 5



(Msg. 1) Posted: Sun Jul 13, 2003 5:12 pm
Post subject: authorisation fails to work - really confused!
Archived from groups: alt>apache>configuration (more info?)

Hi,

Here's what I've done so far..... (windows btw!)

In httpd.conf I changed the .htaccess to the following (for windoze)

AccessFileName folder.access

So now it should look for files called folder.access, right?

I created a password file, which I named "users.pas" and placed it in the
directory "C:/Server/Apache Group/Apache/passwords"

The users.pas contains the user "blabla".

Ok, so far i think.

I have created an alias for folder D:/installs called "/dalias/"

In the D:/installs directory I created the file "folder.access" and it
contains the following lines

AuthType Basic
AuthName "By Invitation Only"
AuthUserFile C:/Server/Apache Group/Apache/passwords/users.pas
Require user blabla

But when I browse to http://localhost/dalias/ it doesn't ask for
authorisation..

Can anyone see what i've done wrong?

Thanks!
Rich.

 >> Stay informed about: authorisation fails to work - really confused! 
Back to top
Login to vote
user2359

External


Since: Jul 05, 2003
Posts: 5



(Msg. 2) Posted: Sun Jul 13, 2003 5:58 pm
Post subject: Re: authorisation fails to work - really confused! [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Rich ²°°³" <y5.DeleteThis@6uuyyy.co.uk> wrote in message
news:yNdQa.10417$CV1.79301688@news-text.cableinet.net...
 > Hi,
 >
 > Here's what I've done so far..... (windows btw!)
 >
 > In httpd.conf I changed the .htaccess to the following (for windoze)
 >
 > AccessFileName folder.access
 >
 > So now it should look for files called folder.access, right?
 >
 > I created a password file, which I named "users.pas" and placed it in the
 > directory "C:/Server/Apache Group/Apache/passwords"
 >
 > The users.pas contains the user "blabla".
 >
 > Ok, so far i think.
 >
 > I have created an alias for folder D:/installs called "/dalias/"
 >
 > In the D:/installs directory I created the file "folder.access" and it
 > contains the following lines
 >
 > AuthType Basic
 > AuthName "By Invitation Only"
 > AuthUserFile C:/Server/Apache Group/Apache/passwords/users.pas
 > Require user blabla
 >
 > But when I browse to <a style='text-decoration: underline;' href="http://localhost/dalias/" target="_blank">http://localhost/dalias/</a> it doesn't ask for
 > authorisation..
 >
 > Can anyone see what i've done wrong?
 >
 > Thanks!
 > Rich.
 >
 >

Ok, so I've got as far as the password box but now I can't get it to find
this file...

errorlog..

(2)No such file or directory: Could not open password file: c:/server/apache
group/apache/passwords/users.pas

But that is definately where the user.pas file is!! (oh and I've created
text passwords also).

Rich,.<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: authorisation fails to work - really confused! 
Back to top
Login to vote
nospam173

External


Since: Jul 02, 2003
Posts: 52



(Msg. 3) Posted: Sun Jul 13, 2003 6:16 pm
Post subject: Re: authorisation fails to work - really confused! [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sun, 13 Jul 2003 14:12:46 GMT, The Other Guy responded to a post
from "Rich ²°°³" <y5 DeleteThis @6uuyyy.co.uk> who wrote in
alt.apache.configuration:

 >Hi,
 >
 >Here's what I've done so far..... (windows btw!)
 >
 >In httpd.conf I changed the .htaccess to the following (for windoze)
 >
 >AccessFileName folder.access
 >
 >So now it should look for files called folder.access, right?

I theory, yes.

 >I created a password file, which I named "users.pas" and placed it in the
 >directory "C:/Server/Apache Group/Apache/passwords"
 >
 >The users.pas contains the user "blabla".
 >
 >Ok, so far i think.

Have you got the prerequisite:
AllowOverride AuthConfig
<a style='text-decoration: underline;' href="http://httpd.apache.org/docs-2.0/howto/auth.html#theprerequisites" target="_blank">http://httpd.apache.org/docs-2.0/howto/auth.html#theprerequisites</a>

 >I have created an alias for folder D:/installs called "/dalias/"

Has Apache got the right permissions to access D drive? In other
words, can it access it normally without the password protection? From
your comments below I assume this to be the case.

 >In the D:/installs directory I created the file "folder.access" and it
 >contains the following lines


 >AuthType Basic
 >AuthName "By Invitation Only"
 >AuthUserFile C:/Server/Apache Group/Apache/passwords/users.pas

Put quotes around the above because you have a space in your file name
"Apache Group" (otherwise it thinks that it is two parameters.
e.g., "AuthUserFile C:/Server/Apache Group/Apache/passwords/users.pas"


 >Require user blabla
 >
 >But when I browse to <a style='text-decoration: underline;' href="http://localhost/dalias/" target="_blank">http://localhost/dalias/</a> it doesn't ask for
 >authorisation..
 >
 >Can anyone see what i've done wrong?
 >
 >Thanks!
 >Rich.
 >

It is better to put the password protection in a directory container
as opposed to an individual file like .htaccess. In other words, put
the lines in a directory container like so:

<Directory "D:/installs/dalias">
AllowOverride AuthConfig
AuthType Basic
AuthName "By Invitation Only"
AuthUserFile C:/Server/Apache Group/Apache/passwords/users.pas
Require user blabla
# plus any other Options that you desire
</Directory>

Depending on your setup, I put AllowOverride AuthConfig in the htdocs
directory container (so that all subdirectories inherit this
property), and then use AllowOverride None in subdirectories if I
want to make sure that access isn't an issue. See
<a style='text-decoration: underline;' href="http://httpd.apache.org/docs/mod/core.html#allowoverride" target="_blank">http://httpd.apache.org/docs/mod/core.html#allowoverride</a>


Check your error logs for any details as to why it may not be working.

HTH
TOG

--
../configure --prefix=~/zyterion
Not this guy or that guy, The Other Guy.

This spot may contain a satirical comment or comedic source,
and is meant to be funny. If you are easily offended, gullible
or don't have a sense of humour we suggest you read elsewhere.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: authorisation fails to work - really confused! 
Back to top
Login to vote
nospam173

External


Since: Jul 02, 2003
Posts: 52



(Msg. 4) Posted: Sun Jul 13, 2003 6:20 pm
Post subject: Re: authorisation fails to work - really confused! [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sun, 13 Jul 2003 15:16:58 GMT, The Other Guy responded to a post
from The Other Guy <nospam.TakeThisOut@this.addy> who wrote in
alt.apache.configuration:
<snip>
 >Put quotes around the above because you have a space in your file name
 >"Apache Group" (otherwise it thinks that it is two parameters.
 >e.g., "AuthUserFile C:/Server/Apache Group/Apache/passwords/users.pas"
<snip>

sorry, put the quotes in wrong place; s/b

AuthUserFile "C:/Server/Apache Group/Apache/passwords/users.pas"

 ><Directory "D:/installs/dalias">
 > AllowOverride AuthConfig
 >AuthType Basic
 >AuthName "By Invitation Only"
 >AuthUserFile C:/Server/Apache Group/Apache/passwords/users.pas

AuthUserFile "C:/Server/Apache Group/Apache/passwords/users.pas"
....

<snip>

--
../configure --prefix=~/zyterion
Not this guy or that guy, The Other Guy.

This spot may contain a satirical comment or comedic source,
and is meant to be funny. If you are easily offended, gullible
or don't have a sense of humour we suggest you read elsewhere.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: authorisation fails to work - really confused! 
Back to top
Login to vote
user2373

External


Since: Jul 14, 2003
Posts: 1



(Msg. 5) Posted: Mon Jul 14, 2003 6:07 pm
Post subject: Re: authorisation fails to work - really confused! [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"The Other Guy" <nospam.DeleteThis@this.addy> wrote in message
news:v3u2hvgqnp5bn18auofle76bkngp9c2t2e@4ax.com...
 > On Sun, 13 Jul 2003 15:16:58 GMT, The Other Guy responded to a post
 > from The Other Guy <nospam.DeleteThis@this.addy> who wrote in
 > alt.apache.configuration:
 > <snip>
  > >Put quotes around the above because you have a space in your file name
  > >"Apache Group" (otherwise it thinks that it is two parameters.
  > >e.g., "AuthUserFile C:/Server/Apache Group/Apache/passwords/users.pas"
 > <snip>
 >
 > sorry, put the quotes in wrong place; s/b
 >
 > AuthUserFile "C:/Server/Apache Group/Apache/passwords/users.pas"
 >
  > ><Directory "D:/installs/dalias">
  > > AllowOverride AuthConfig
  > >AuthType Basic
  > >AuthName "By Invitation Only"
  > >AuthUserFile C:/Server/Apache Group/Apache/passwords/users.pas
 >
 > AuthUserFile "C:/Server/Apache Group/Apache/passwords/users.pas"
 > ...
 >
 > <snip>
 >
 > --
 > ./configure --prefix=~/zyterion
 > Not this guy or that guy, The Other Guy.
 >
 > This spot may contain a satirical comment or comedic source,
 > and is meant to be funny. If you are easily offended, gullible
 > or don't have a sense of humour we suggest you read elsewhere.


Hi,

Thanks for your help!

I took on board your suggestions and also shifted the users.pas file to the
following location "C:/Server/Passwords" - it all seems to work now!

I think the space was causing a problem more than anything else.

Thanks again,
Rich.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: authorisation fails to work - really confused! 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]