At what scope in the Apache configuration is the authn configuration
related to MySQL defined. At global scope, another VirtualHost and is
it constrained to a Directory block and if so what.

BTW, setting:

  DocumentRoot    /usr/local/www/trac

may not be a good idea. You certainly don't want to do that if your
Trac instance is located under that directory.

If it is and you comment out WSGIScriptAlias, then your Trac project
becomes downloadable.

So, never point DocumenRoot at directories containing code or sensitive data.

You might also wide up LogLevel to 'info'. Usually it defaults to
'warn' and not 'error', so you are already restricting what messages
are being logged. Using 'info' makes it more verbose again than 'warn'
and may be lucky and an Apache module logs more detail which is
relevant.

Graham

On 18 November 2011 03:09, Admin Cyanide <[email protected]> wrote:
> Hi everyone,
>
> I'm trying to authenticate against my own wsgi script with this vhost config
> :
>
> <VirtualHost *:80>
>        ServerName      trac.cyanide-studio.com
>        ServerAdmin     [email protected]
>        DocumentRoot    /usr/local/www/trac
>
>        WSGIScriptAlias / /usr/local/www/trac/trac.wsgi
>
> <Directory /usr/local/www/trac>
>                AuthType Basic
>                AuthName "Cyanide's Trac"
>                AuthBasicAuthoritative On
>                AuthBasicProvider wsgi
>                WSGIAuthUserScript /usr/local/www/trac/authz.wsgi
>                Require valid-user
>
>                Order deny,allow
>                Allow from all
> </Directory>
>
>        ErrorLog        /var/log/apache/trac-errors.log
>        LogLevel        error
> </VirtualHost>
>
> For tests purposes I made the following function :
>
> def check_password(environ, user, user_password):
>    return True
>
> But each time I try to authn it doesn't work and I have the following log
> lines :
> [Thu Nov 17 16:29:58 2011] [error] [client 10.1.8.96] MySQL ERROR: Can't
> connect to local MySQL server through socket '/tmp/mysql.sock' (2)
> [Thu Nov 17 16:29:58 2011] [error] [client 10.1.8.96] MySQL user ddc not
> found: /
>
>
> MySQL is used as authn provider for some others services.
>
> I don't understand why the wsgi script doesn't work.
> And with the AuthBasicAuthoritative explicitly set to "On" I don't
> understand why MySQL provider is asked at all.
>
> I tried with AuthBasicAuthoritativedirective set to Off, same issue.
> I checked the file name/path, it's ok.
>
> If someone have an idea, it would be great.
> Thanks,
>
> Bastien Semene
>
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/modwsgi?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to