0

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.

2 Answers 2

0

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.

1
  • /var/www/twiki is my root twiki, so whats the value of /do here? httpd.conf file cgi path is /var/www/cgi-bin. I am trying to use /var/www/twiki/bin as another place for cgi scripts for twiki. I am using apache login/passwd after creating login/passwd using htpasswd and stored in /var/www/twiki/data/.htpasswd Oct 24, 2013 at 18:43
0

ScriptAlias /do "/var/www/twiki/bin"

The /do is the URL path, so that you access TWiki like http://example.com/do/view, which will call the script at var/www/twiki/bin/view.

You don't need to manually create the .htpasswd. Register users in TWiki once configured.

I recommend using the template login, not apache login. That way users can login and logout.

Visit TWiki.org, helpful community there.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .