I am setting up twiki configuration with apache and having issues with htpasswd not working. I have set the passwd prior and stored in /var/www/twiki/data/.htpasswd file. Configuration is shown below. What could be reason ??
/etc/httpd/conf/httpd.conf configure looks like this:
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
<Directory "/var/www/cgi-bin">
AllowOverride None
Options ExecCGI
SetHandler cgi-script
Order allow,deny
Allow from all
</Directory>
and I am setting twiki.conf (twiki.org) files in /etc/httpd/conf.d/twiki.conf
ScriptAlias /twiki "/var/www/twiki/bin"
Alias /twiki/pub "/var/www/twiki/pub"
# This specifies the options on the TWiki scripts directory. The ExecCGI
# and SetHandler tell apache that it contains scripts. "Require all granted"
# lets any IP address access this URL.
<Directory "/var/www/twiki/bin">
AllowOverride None
Require all granted
Deny from env=blockAccess
Options ExecCGI FollowSymLinks
SetHandler cgi-script
# Password file for TWiki users
AuthUserFile /var/www/twiki/data/.htpasswd
AuthName 'Enter your WikiName:
AuthType Basic
# File to return on access control error (e.g. wrong password)
ErrorDocument 401 /twiki/view/TWiki/TWikiRegistration
When I press cancel on login screen, it just throws 401 but never takes me to TWikiRegistration page???? Please help.
Best Answer
One issue I see is your ScriptAlias and Alias. The Alias never applies. Either change the ScriptAlias to /do or something else than /twiki, or switch the two settings. Not sure though if this fixes your apache login issue. Why apache login and not template login?
I recommend using TWiki's apache config generator, http://twiki.org/cgi-bin/view/TWiki/ApacheConfigGenerator
We have a friendly community on TWiki.org, I invite you to stop by.