Mailing List Archive

Authentication with mod_wsgi and Apache
I'm having problems getting authentication working with mod_wsgi and
Apache.
I'm running trac on my webserver which has Cent OS and Apache, MySQL and
mod_wsgi plugins

TRAC Error
Authentication information not available. Please refer to the installation
documentation<http://dev.pravusmedia.com/wiki/TracInstall#ConfiguringAuthentication>
.

Here is my .conf file for the site I'm trying to enable:

WSGIScriptAlias /trac /home/my-site/public_html/trac/trac.wsgi

<Directory /home/my-site/public_html/trac/cgi-bin/>
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>

ServerName dev.my-site.com
DocumentRoot /home/my-site/public_html/trac/htdocs/
WSGIScriptAlias / /home/my-site/public_html/trac/cgi-bin/trac.wsgi
<Location /login>
AuthType Basic
AuthName "Trac"
AuthUserFile /home/my-site/public_html/trac/htpasswd
Require valid-user
</Location>
</VirtualHost>

Can someone please help?

thanks,
caleb


--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/dDMGGHu-jlEJ.
To post to this group, send email to trac-users@googlegroups.com.
To unsubscribe from this group, send email to trac-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
Re: Authentication with mod_wsgi and Apache [ In reply to ]
I have changed the following to this and now I get the error below. Any
help would be appreciated!

<Location /home/my-site/public_html/trac/login>
AuthType Basic
AuthName "Trac"
AuthUserFile /home/my-site/public_html/trac/htpasswd
Require valid-user
</Location>

Error: Not Found

No handler matched request to /401.shtml
Thanks,
Caleb

On Sunday, April 15, 2012 5:23:55 PM UTC-5, Caleb wrote:
>
> I'm having problems getting authentication working with mod_wsgi and
> Apache.
> I'm running trac on my webserver which has Cent OS and Apache, MySQL and
> mod_wsgi plugins
>
> TRAC Error
> Authentication information not available. Please refer to the installation
> documentation<http://dev.pravusmedia.com/wiki/TracInstall#ConfiguringAuthentication>
> .
>
> Here is my .conf file for the site I'm trying to enable:
>
> WSGIScriptAlias /trac /home/my-site/public_html/trac/trac.wsgi
>
> <Directory /home/my-site/public_html/trac/cgi-bin/>
> WSGIApplicationGroup %{GLOBAL}
> Order deny,allow
> Allow from all
> </Directory>
>
> ServerName dev.my-site.com
> DocumentRoot /home/my-site/public_html/trac/htdocs/
> WSGIScriptAlias / /home/my-site/public_html/trac/cgi-bin/trac.wsgi
> <Location /login>
> AuthType Basic
> AuthName "Trac"
> AuthUserFile /home/my-site/public_html/trac/htpasswd
> Require valid-user
> </Location>
> </VirtualHost>
>
> Can someone please help?
>
> thanks,
> caleb
>
>
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/5-at2Js5dXkJ.
To post to this group, send email to trac-users@googlegroups.com.
To unsubscribe from this group, send email to trac-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
RE: Re: Authentication with mod_wsgi and Apache [ In reply to ]
[.Note: convention here is to add at the end so it is easier to read...]

> On Sunday, April 15, 2012 5:23:55 PM UTC-5, Caleb wrote:
>
> I'm having problems getting authentication working with
> mod_wsgi and Apache.
> I'm running trac on my webserver which has Cent OS and
> Apache, MySQL and mod_wsgi plugins
>
> TRAC Error
> Authentication information not available. Please refer
> to the installation documentation
> http://dev.pravusmedia.com/wiki/TracInstall#ConfiguringAuthentication
>
>
> Here is my .conf file for the site I'm trying to enable:
>
> WSGIScriptAlias /trac /home/my-site/public_html/trac/trac.wsgi
>
> <Directory /home/my-site/public_html/trac/cgi-bin/>
> WSGIApplicationGroup %{GLOBAL}
> Order deny,allow
> Allow from all
> </Directory>
>
> ServerName dev.my-site.com
> DocumentRoot /home/my-site/public_html/trac/htdocs/
> WSGIScriptAlias /
> /home/my-site/public_html/trac/cgi-bin/trac.wsgi
> <Location /login>
> AuthType Basic
> AuthName "Trac"
> AuthUserFile /home/my-site/public_html/trac/htpasswd
> Require valid-user
> </Location>
> </VirtualHost>
>
> Can someone please help?
>
> thanks,
> caleb
>
> -----Original Message-----
> From: trac-users@googlegroups.com
> [mailto:trac-users@googlegroups.com] On Behalf Of Caleb
> Sent: 16 April 2012 00:51
> To: trac-users@googlegroups.com
> Subject: [Trac] Re: Authentication with mod_wsgi and Apache
>
>
> I have changed the following to this and now I get the error
> below. Any help would be appreciated!
>
> <Location /home/my-site/public_html/trac/login>
> AuthType Basic
> AuthName "Trac"
> AuthUserFile /home/my-site/public_html/trac/htpasswd
> Require valid-user
> </Location>
>
>
> Error: Not Found
>
>
> No handler matched request to /401.shtml
>
> Thanks,
> Caleb
>
Your specific error looks like there is something wrong with the local config for serving error pages as 401 is `Similar to 403 Forbidden, but specifically for use when authentication is possible but has failed or not yet been provided.`

I'm not that familiar with apache on *nix but have you made sure all of the required modules are loaded? Check out the apache httpd docs for all your directives to find out which modules provide the directives e.g. `AuthUserFile` is provided by mod_authn_file:-

http://httpd.apache.org/docs/2.2/mod/mod_authn_file.html#authuserfile

~ mark c

--
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@googlegroups.com.
To unsubscribe from this group, send email to trac-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.