Created
October 11, 2010 01:47
-
-
Save justinkelly/619841 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Directory /> | |
Options FollowSymLinks | |
AllowOverride All | |
Options -Indexes | |
</Directory> | |
Alias /code /var/bzr/repo/ | |
WSGIScriptAliasMatch ^/code/.*/\.bzr/smart$ /var/bzr/repo/bzr_serve.wsgi | |
#The three next lines allow regular GETs to work too | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI} !^/code/.*/\.bzr/smart$ | |
RewriteRule ^/code/(.*/\.bzr/.*)$ /var/bzr/repo/$1 [L] | |
<Directory /var/bzr/repo> | |
WSGIApplicationGroup %{GLOBAL} | |
</Directory> | |
<Location /code> | |
AuthType Basic | |
AuthName "Trac Source Access" | |
AuthUserFile /path/to/trac/.htpasswd | |
<LimitExcept GET> | |
Require valid-user | |
</LimitExcept> | |
</Location> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bzrlib.transport.http import wsgi | |
def application(environ, start_response): | |
app = wsgi.make_app( | |
root="/var/bzr/repo/", | |
prefix="/code", | |
readonly=False, | |
enable_logging=False) | |
return app(environ, start_response) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment