On Sep 15, 5:35 pm, Robert Waltemath <[EMAIL PROTECTED]> wrote: > Hi Graham, > > On 15 Sep., 02:11, Graham Dumpleton <[EMAIL PROTECTED]> > wrote: > > > > > On Sep 15, 2:16 am, Robert Waltemath <[EMAIL PROTECTED]> > > wrote: > > > > Hello, > > > > I use the following Apache 2.2.3/ mod_python 3.2.10/ Trac 0.10.4 > > > configuration: > > > > <VirtualHost someip:80> > > > ServerName myserver.net > > > DocumentRoot /srv/test/docroot > > > > <Location /trac> > > > Order Allow,Deny > > > Allow from all > > > > SetHandler mod_python > > > PythonHandler trac.web.modpython_frontend > > > PythonOption TracEnv /srv/test/project > > > PythonOption TracUriRoot /trac > > > </Location> > > > </VirtualHost> > > > > Trac is just working fine, but in Apache error log lines like the > > > following show up for every request: > > > > [error] client denied by server configuration: /srv/test/docroot/ > > > roadmap, referer:http://myserver.net/trac/roadmap > > > This is generated by mod_authz_host. You must have outside of your > > VirtualHost a restriction on access from certain hosts, or you have > > the Order/Deny directives set too restrictively as default and haven't > > opened it up for document root. When someone access outside of /trac, > > ie., / or /somefile, then the restrictions are applying. > > Yes, right, mod_authz_host by default denies access to the whole > filesystem. In this case the DocumentRoot is fake (though it exists) > as I don't want it to be accessible. I only want some special > locations like "/trac" to work. But when I access e.g. > http://myserver.net/trac/roadmap > I get an error for /srv/test/docroot/roadmap (and some more for /srv/ > test/docroot/chrome..., one for each request), which means that > somebody must have tried to access > http://myserver.net/roadmap (or the filesystem location directly) > AND trac is working, though there is an access-denied error. > > One could say that I should just ignore the error if everything is > working fine, but who wants strange error messages in their logs? :)
The problem is that Location overlays on top of Directory, so Directory checks against DocumentRoot are done first. Thus, because document root isn't accessible you will get these messages. Ultimately this is because of how Location must be used when using mod_python to map to Trac instance. That Location overlays Directory likes this is always causing problems when using mod_python. BTW, why don't you just mount the Trac instance as the root of the web server if nothing outside of that path will be accessible anyway. Also, if you used mod_wsgi you would not get these problems as it uses Alias instead of Location to map to Trac. There will be no messages because Alias takes precedence over Directory and DocumentRoot. If interested in Trac setup with mod_wsgi see: http://code.google.com/p/modwsgi/wiki/IntegrationWithTrac Graham --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" 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/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---
