ソフト/Bug Tracking/trac/MercurialPlugin - discypus
メモ: 2008-10-24
HgWebDirStepByStep - Mercurial を見ながら、mod_wsgi経由の閲覧の設定をやってみた。
環境はDebian 4.0, Apache/2.2.3 (Debian) DAV/2 SVN/1.4.2 mod_python/3.2.10 Python/2.4.4 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_wsgi/2.3
閲覧だけ、認証無し、ならこんな感じか。 [collections]で楽しようと思ったけどいまいちconfigの動作がわからんので[paths]でリポジトリを一個ずつ指定した。
/var/www/wsgi/hgwebdir.wsgi:
from mercurial.hgweb.hgweb_mod import hgweb from mercurial.hgweb.hgwebdir_mod import hgwebdir CONFIG = '/var/hg/public.config' application = hgwebdir(CONFIG)/var/hg/config:
#[collections] #hgsandbox = /var/hg/hgsandbox # リポジトリhgsandboxのURLがhttp://localhost/hg/var/hg/hgsandboxになる。 # /var/hg/hgsandbox = /var/hg/hgsandbox # 見つからなくなる # hgsandbox = hgsandbox # 500 Internal Server Error: OSError: [Errno 2] No such file or directory: 'hgsandbox' [paths] hgsandbox = /var/hg/hgsandbox/etc/apache2/sites-available/trac:
WSGIScriptAlias /hg /var/www/wsgi/hgwebdir.wsgi
既存の WSGIScriptAlias は消していいのかな

