Hi.

> I was trying to set up something similar on my own server,
> but I was unable to configure my Apache to do this right.
> If Trac is served on location /, then requests to /svn/ go to Trac, and
> not to mod_dav_svn...

The trick here is that "order matters". The following is the basic stuff
of what works on t-h.o:

=== cut ===
WSGIScriptAlias /       /path/to/trac-0.10/cgi-bin/trac.wsgi

<Directory      /path/to/trac-0.10/cgi-bin>
        WSGIApplicationGroup    %{GLOBAL}
        WSGIProcessGroup        trac-hacks-010
        Order   deny,allow
        Allow   from all
</Directory>

# Stuff that should be served directly by Apache, not by Trac
Alias   /robots.txt     /path/to/trac/htdocs/robots.txt
Alias   /favicon.ico    /path/to/trac/htdocs/favicon.ico
Alias   /chrome/common  /path/to/trac/htdocs/common
Alias   /chrome/site    /path/to/trac/htdocs/site
Alias   /errorpages     /path/to/trac/htdocs/errorpages
Alias   /raw-attachment /path/to/trac/htdocs/attachments/

# use mod_rewrite to let Apache handle 0.10-style requests for
# raw attachments
RewriteEngine   On
RewriteCond     %{QUERY_STRING} ^format=raw$
RewriteRule     ^/attachment/(.*) /var/trac/trachacks010/attachments/$1 [L]

# Subversion repository
<Location /svn>
        DAV             svn
        SVNPath         /path/to/svn

        # our access control policy
        AuthzSVNAccessFile      /path/to/authzfile

        # try anonymous access first, resort to real
        # authentication if necessary.
        Satisfy         any
        Require         valid-user

        # how to authenticate a user
        AuthType        Basic
        AuthName        "Trac Hacks"
        AuthUserFile    /path/to/htpasswdfile
</Location>

# Trac login
<Location /login>
        AuthType        Basic
        AuthName        "Trac Hacks"
        AuthUserFile    /path/to/htpasswdfile
        Require         valid-user
</Location>
=== cut ===

Things should work similar for Trac 0.12.

Hope this helps.

Bye, Mike
_______________________________________________
th-users mailing list
[email protected]
https://lists.trac-hacks.org/mailman/listinfo/th-users

Reply via email to