lighttpd + mod_proxy + apache2 + mod_dav_svn

2006/10/30
By

My aim is using svn on my project with trac support. We have established trac via lighttpd several weeks ago. However we can not directly access svn via HTTP protocol.

At first, we try to map /repos to svnn’s directory by mod_alias:

alais.url = (
"/repos/" => "/var/svn"
)

It works (I mean alias part) and fails (svn do not recognize that).

So let’s search, there is an article on lighttpd official site describing how to use lighttpd with subversion. It seems like the only choice we have. But I don’t like to make another authentication for apache. So I’ve come up with a solution. Here is the final solution:

in lighttpd.conf:

$HTTP["host"] =~ "MYHOSTNAME" {
$HTTP["url"] =~ "^/repos/" {
auth.require = ( "/repos" =>
(
"method" => "basic",
"realm" => "subversion repository",
"require" => "valid-user"
)
)
proxy.server = (
"/repos" => ( ( "host" => "127.0.0.1″, "port" => 8080 ) )
)
}
}

in apache2‘s httpd.conf:


ServerName MYHOSTNAME
DocumentRoot /usr/local/www/data


DAV svn
SVNParentPath /var/svn
SVNAutoversioning on
Order allow,deny
Allow from all

The screen shot:
Revision 1
:)

[tag]lighttpd subversion, lighttpd, subversion, trac[/tag]

4 Responses to lighttpd + mod_proxy + apache2 + mod_dav_svn

  1. -TMA-1- » links for 2006-11-03 on 2006/11/03 at 8:22 上午

    [...] Hi! I’m clsung » Blog Archive » lighttpd + mod_proxy + apache2 + mod_dav_svn (tags: Tech Apache lighttpd Guide SVN) [...]

  2. dlin on 2007/06/28 at 11:29 下午

    hi, 我用 trac apache svn,
    請教為何用 lighttpd svn apache trac 呢?
    這樣不是多裝一套 lighttpd 嗎? 還是效能高很多呢?

  3. clsung on 2007/06/29 at 11:10 下午

    lighttpd 的介紹很多人都有, 所以就不介紹啦, 不過我個人是覺得比 apache2 在執行我所需要的程式上面速度快啦 :) 啊因為 lighttpd 目前對 DAV 的支援就….所以還會用 apache2 來專門做這個…

  4. [...] australia web design atlanta web design arizona web design area web design application web design animation web design affordable web design [...]

發表迴響

您的電子郵件位址並不會被公開。 必要欄位標記為 *

*


*