私は持っている
server.document-root = "/srv/www"
しかし、いくつかの静的ファイルでは、別のドキュメントルートを使用したい. 私はこのコードを使用してみます:
$HTTP["url"] =~ "^/hg/static" { url.rewrite-once = ("^/hg/static" => "/") server.document-root = "/usr/lib/python2.6/site-packages/mercurial/templates/static/" }
しかし、 error.logにエラーが表示されます:
2011-10-13 12:00:16: (/response.c.539) -- ファイルが見つかりません 2011-10-13 12:00:16: (/response.c.540) パス: /usr/lib/python2.6/site-packages/mercurial/templates/static/hg/static/style-coal.css
試したとき:
$ wget http://localhost/hg/static/style-coal.css
要求されたファイルへの実際のパスは/usr/lib/python2.6/site-packages/mercurial/templates/static/style-coal.cssですが、サーバーは/usr/lib/python2.6/site-packages/mercurial/templatesを見つけようとします/static/ hg/static/ style-coal.css