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 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.

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

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2006-03-12 - CrawfordCurrie
 
  • 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.