
net.balajiraja at gmail
Nov 16, 2009, 1:18 AM
Post #2 of 2
(1069 views)
Permalink
|
Hi Luca, The document root has to be given properly in the apache configuration file.I hope that python module has been loaded in the initial part of your httpd.conf file.The below configration is for multi-project handling. Please find the below working configuration, which works fine. The hierarchy should be maintained.Some of the python option hadler were missing in your configuration. /***httpd.conf****/ Listen 80 LoadModule python_module modules/mod_python.so ServerName server1.trac.com:80 DocumentRoot "D:/Python24/Lib/site-packages/trac <Directory "D:/Python24/Lib/site-packages/trac"> <VirtualHost *:80> DocumentRoot / ServerName server1.trac.com <Location /> SetHandler mod_python PythonInterpreter main_interpreter PythonHandler trac.web.modpython_frontend PythonOption TracEnvParentDir D:/project PythonOption TracUriRoot / Order deny,allow Deny from all Allow from 192.168.1 </Location> <LocationMatch "/[^/]+/login"> AuthType Basic AuthName "Trac Server" AuthUserFile D:/trac.htpasswd Require valid-user </LocationMatch> </VirtualHost> Regards, Balaji On Nov 13, 6:32 pm, Luca <luca.ca...@sequoia.it> wrote: > Hello, > > I have installed Trac 0.11.5 on Debian/Squeeze with > Apache2+mod_python, and I have a problem setting up the wished > authentication configuration for it. I want that outside the LAN of > the server, an http basic authentication is required for anything > under the root, i.e. / . > But I also need to require authentication always (whether inside or > outside of the LAN) when someone want to create a new ticket > accessing /Trac/login. The relevant sections in the httpd.conf file > are: > > #TRAC AUTHENTICATION CONFIGURATION > <Location /Trac> > SetHandler mod_python > PythonHandler trac.web.modpython_frontend > PythonOption TracEnv "/www/trac" > PythonOption TracUriRoot /Trac > </Location> > <Location /Trac/login> > AuthType Basic > AuthName "Trac Restricted Area Access" > AuthUserFile "/var/www/trac/conf/trac.passwd" > Require valid-user > </Location> > <Location /> > Options Indexes FollowSymLinks > AllowOverride None > Require valid-user > Order Deny,Allow > Deny from all > Allow from 192.168.1 > Allow from localhost > Satisfy Any > AuthType Basic > AuthName "Sequoia Linux Server Restricted Access" > AuthUserFile "/etc/apache2/x.passwd" > </Location> > > This configuration does not work properly: indeed while if anyone > access the server by outside the LAN it is prompted for a password, if > I access /Trac/login from the inside i get the infamous "Trac Error > Authentication information not available.". If I remove the <Location /> section, then the Trac authentication work nicely. log/trac.log > > contains such entries when accessing /Trac/login: > > 2009-11-13 14:31:57,854 Trac[main] WARNING: HTTPInternalError: 500 > Trac Error (Authentication information not available. Please refer to > the <a href="/Trac/wiki/TracInstall#ConfiguringAuthentication" > title="Configuring Authentication">installation documentation</a>.) > > Any help? > TIA, > Luca --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to trac-users [at] googlegroups To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---
|