Question
Well, I was doing so
well for a non-expert, Twiki is downloaded and running just fine, testenv all happy, etc., TPreferences updated...
But the server is public facing so I need to enable auth.
I followed the steps in the Install guide to rename the .htaccess, replace the FILE and URL strings, etc.
Then I restarted Apache (not clear if this was necessary)
But... I still have full access to the Webs as "Guest" user, it's not asking me to log in at all.
The current .htaccess is really just the disti file with the two strings globally replaced, here are a couple of sample lines...
AuthUserFile /home/groups/home/web/twiki/data/.htpasswd
AuthName 'Enter your WikiName: (First name and last name, no space, no dots, capitalized, e.g. JohnSmith). Cancel to register if you do not have one.'
AuthType Basic
ErrorDocument 401 web3.wizards.co.uk/twiki/bin/oops/TWiki/TWikiRegistration?template=oopsauth
I guess I've missed something elemental but I can't spot the silly mistake.
Environment
--
ChrisComley - 04 Apr 2005
Answer
What does your
httpd.conf file look like? Especially the
AllowOverride directive for the
bin dir is of interest. (If the
AllowOverride directive is not set,
.htaccess doesn't take much effect :-)).
--
SteffenPoulsen - 04 Apr 2005
as an example - from the debian package's (in unstable only

) apache conf file,
# Added for twiki
Alias /twiki/pub /var/www/twiki/pub
Alias /twiki/data /var/lib/twiki/data
Redirect /twiki/index.html http://sven/cgi-bin/twiki/view
#Redirect /twiki/ http://sven/cgi-bin/twiki/view
# make sure this is even needed, and ref the doc section needing it
<Directory /usr/lib/cgi-bin/twiki/>
Options +ExecCGI
SetHandler cgi-script
AllowOverride all
Allow from all
</Directory>
# End twiki Configuration Block
--
SvenDowideit - 04 Apr 2005
Ahha! That fixed it, thanks very much.
--
ChrisComley - 05 Apr 2005
Except...
Now I need to add users to .htpasswd, which I presumed I could do using the
TWikiRegistration page after I'd copied the "TWikiRegistrationPub" over the default page as per the documents.
But when I try to run it I get an error "Already Registered". Seems to be confusing my registration
here with my new local installation. Or are Twiki Registrations supposed to be Global in scope?
--
ChrisComley - 05 Apr 2005
Make a clean install and try again - and let things progress in sync. Your problem is probably, that the users you added in the first round hasn't been deleted from
TWikiUsers before your second registration try (with
.htaccess enabled).
Just shooting blindly here .. if you don't want to start over, you can add the users which are in
TWikiUsers - but not in
.htpasswd - manually, using the
htpasswd utility.
--
SteffenPoulsen - 05 Apr 2005
Aha! That did it. I could have sworn I had not yet
done a
TWikiRegistration on my own server, only on the twiki.org server so I could lodge this qyuestion, but indeed, when I clicked into
TWikiUsers, tehre I was. So I did a manual htpasswd generation and added the line to the file for the
WikiName and bingo!
Thanks for the input.
--
ChrisComley - 07 Apr 2005