Tags:
create new tag
, view all tags

Question

I am trying to set up Apache authentication for one of my TWiki installs. I have the .htaccess file, and the .htpasswd files set up. I have made the changes to the .htaccess file to point the various variables to the correct directories. The authentication settings from /bin/configure are set to Apache authentication.

When I try to view a page, I get the following error in the Apache error log:

/var/www/twikis/usims/bin/.htaccess: Invalid command '{DataDir}', perhaps mis-spelled or defined by a module not included in the server configuration

I have tried removing the braces and placing a percent (%) in front of the braces but that only changes the error.

I figure I am missing something rather simple here.

Any ideas?

Environment

TWiki version: TWikiRelease04x00x00
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Mandriva 10.0
Web server: Apache 2.0.48
Perl version: 5.8.3
Client OS: Any
Web Browser: Firefox
Categories: Htaccess

-- ShawnDevlin - 04 Mar 2006

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 .htaccess file is an Apache configuration file, whereas you seem to feed it a TWiki configuration.

Usually you run bin/configure from your Browser to set TWiki's directories (like $cfg{DataDir}), which writes the paths to lib/LocalSite.cfg.

In .htaccess, all you need to point to is your .htpasswd file, like:

<Directory "whereever/you/installed/bin">
   AuthType Basic
   AuthName "Authenticated TWiki"
   AuthUserFile /home/haj/public_html/htpasswd.twiki
   <Files viewauth>
       Require valid-user
   </Files>
   <Files edit>
       Require valid-user
   </Files>
...etc
</Directory>

You usually define the .htaccess file for both TWiki and Apache so that while Apache is using it for authentication, TWiki allows changing password from a web interface.

-- HaraldJoerg - 05 Mar 2006

 
Topic revision: r4 - 2006-03-12 - CrawfordCurrie
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, 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.