Tags:
create new tag
view all tags

Question

I have TWikiUserAuthentication set up with Partial_Authentication on only selected webs. Everything works fine, except for the redirect to the oopsauth template, which is where I would like users to land if they request some protected page, or edit script, so that they can register or change their passwords if they can't login.

I found PartitialAuthenticationForcesAllUserToAuthenticate, which applied to me, but it does not address my issue specifically.

I have the following line in my cgi-bin/.htaccess:

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

If you manually browse to http://twiki.svsoliton.net/cgi-bin/oops/TWiki/TWikiRegistration?template=oopsauth, it works just fine. But if you try to access any protected page, or viewauth, or even just to the home index.html, and cancel out of the authentication dialog, it will return this error page:


Authorization Required

This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request. Apache/2.0.46 (Red Hat) Server at www.svsoliton.net Port 80


My server access-log file contains the following lines:

207-171-180-101.amazon.com - - [16/Dec/2005:09:27:51 -0600] "GET / HTTP/1.1" 302 313 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 8.51"
207-171-180-101.amazon.com - - [16/Dec/2005:09:27:51 -0600] "GET /cgi-bin/viewauth HTTP/1.1" 500 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 8.51"
207-171-180-101.amazon.com - - [16/Dec/2005:09:27:55 -0600] "GET /favicon.ico HTTP/1.1" 200 1406 "http://twiki.svsoliton.net/cgi-bin/viewauth" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 8.51"

The only entry in the server's error-log is:

[Fri Dec 16 09:27:51 2005] [error] [client 207.171.180.101] Premature end of script headers: oops

The only entries in the data/debug.txt file is like this:

16 Dec 2005 - 09:09 Diff version 1.02

This may be unrelated, but looks suspicious to me, even though everything else seems to work without a problem: I am running on an Ensim-based hosted server, and I installed TWiki on a "subdomain". Several of the lines reported by testenv look "wrong" to me. Here is a list of what I see and what I would expect to see:

name testenv reports expected
DOCUMENT_ROOT /var/www/html /var/subdomain/twiki/html (which is a link to /home/twiki/public_html
HTTP_HOST twiki.svsoliton.net this is fine, but see SCRIPT_URI and SERVER_NAME
SCRIPT_URI http://www.svsoliton.net/cgi-bin/testenv http://twiki.svsoliton.net/cgi-bin/testenv
SERVER_NAME www.svsoliton.net twiki.svsoliton.net
SITE_CGIROOT /var/www/cgi-bin not sure, although twiki's cgi root is /home/twiki/public_html/cgi-bin
SITE_HTMLROOT /var/www/html see DOCUMENT_ROOT

Maybe I need to read up on apache's environment variables.

ALERT! I DO NOT HAVE ACCESS to httpd.conf! Neither do I have shell access, only ftp.

My actual bin and lib directory paths are:

bin: /home/twiki/public_html/cgi-bin
lib: /home/twiki/public_html/cgi-bin/lib

I am attaching TWiki.cfg and the cgi-bin/.htaccess file. Please note that I had to set the path to my data directory's .htaccess file like this, before I could get it to work:

AuthUserFile /home/virtual/site236/fst/home/twiki/data/.htpasswd

Environment

TWiki version: TWikiRelease04Sep2004
TWiki plugins: DefaultPlugin, SpreadSheetPlugin, CommentPlugin, EditTablePlugin, InterwikiPlugin, MathModePlugin, RenderListPlugin, SlideShowPlugin, SmiliesPlugin, TablePlugin
Server OS: RedHat Linux, version unsure
Web server: Apache/2.0.46 (Red Hat)
Perl version: 5.8.0
Client OS: MS Windows XP, SP2
Web Browser: Opera 8.51 (reproduces also on Firefox and IE)
Categories: Installation, Htaccess, Fatal error, Deployment

-- FulvioCasali - 16 Dec 2005

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatcfg TWiki.cfg r1 manage 23.1 K 2005-12-16 - 17:29 UnknownUser  
Unknown file formatext htaccess-bin r1 manage 3.2 K 2005-12-16 - 20:29 UnknownUser This is from cgi-bin
Unknown file formatext htaccess-root r1 manage 0.5 K 2005-12-16 - 20:31 UnknownUser This is from public_html (the DOCUMENT_ROOT)
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2006-02-04 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.