Tags:
create new tag
, view all tags

Question

I am trying to enable basic authentication for when a user edits a page. I have followed the instructions in the installation guide. New users can register, and enter a username and password. When they try to edit a page, the username/password are never accepted. In Opera, this continues till you get bored, in IE, this happens three times then you get the following message:

!URL_path_to_TWiki!/bin/oops/TWiki/TWikiRegistration?template=oopsauth

This suggests to me that I have a problem with the twiki/bin/.htaccess file, as the login error page is not being loaded as the string !URL_path_to_TWiki! isn't being substituted for the real thing. I have replaced the string !FILE_path_to_TWiki! with /var/www/html/twiki and replaced !URL_path_to_TWiki! with /twiki. Both lines still have the # at the start of the line.

Does anyone have any ideas as to where I might be going wrong? Am I barking up the wrong tree? I have searched extensively, but not found anything that seems to be same problem, and I haven't found any examples of the .htaccess file which would have been useful as this seems to be the only file that needs editing where which bit of text you remove and replace is not obvious.

Environment

TWiki version: TWikiRelease02Sep2004
TWiki plugins:  
Server OS: Fedora Core 4
Web server: Apache 2.0.54
Perl version: 5.8.6
Client OS: MS Windows XP, SP2
Web Browser: Opera 8, IE 6, FireFox 1
Categories: Htaccess, Authentication

-- EdMcDonagh - 13 Jul 2005

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

The documentation is far from clear on this. The Apache docs imply you can put a full url in there, begining with http://

Not so. Or didn't work for me.

What you want is something like

 ErrorDocument 401 /bin/oops/TWiki/TWikiRegistration?template=oopsauth

That might be /cgi-bin/ or whatever your system is set up for.

-- AntonAylward - 17 Jul 2005

Sorry, my mistake. I get it now!

All I needed to do, was do a search and replace of every instance of !URL_path_to_TWiki! with /twiki. Same again with !FILE_path_to_TWiki!. Doh!

Now I know what to do, re-reading the instructions they do make sense. I was expecting for !FILE_path_to_TWiki! and the other one to be variables that you set equal to a value, and I couldn't understand how this was supposed to work...

-- EdMcDonagh - 18 Jul 2005

 
Topic revision: r5 - 2005-07-18 - EdMcDonagh
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by PerlIdeas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.