Hello,
I try to set up on Debian mercurial shared repositories. The webserver is working and python.cgi is working also. Here is my config
Code:
server.modules = (
"mod_cgi",
"mod_access",
"mod_alias",
"mod_accesslog",
"mod_compress",
# "mod_rewrite",
# "mod_redirect",
# "mod_evhost",
# "mod_usertrack",
# "mod_rrdtool",
# "mod_webdav",
# "mod_expire",
# "mod_flv_streaming",
# "mod_evasive"
)
server.document-root = "/var/www/"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
index-file.names = ( "index.py", "index.html",
"default.htm", "hgwebdir.cgi" )
debug.log-file-not-found = "enable"
debug.log-request-handling = "enable"
debug.log-response-header = "enable"
debug.log-request-header = "enable"
cgi.assign = ( ".py" => "/usr/bin/python",
".cgi" => "/usr/bin/python" )
mimetype.use-xattr = "enable"
accesslog.filename = "/var/log/lighttpd/access.log"
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".py", ".cgi" )
# error-handler for status 404
#server.error-handler-404 = "/error-handler.html"
#server.error-handler-404 = "/error-handler.php"
## to help the rc.scripts
server.pid-file = "/var/run/lighttpd.pid"
dir-listing.encoding = "utf-8"
server.dir-listing = "enable"
server.username = "www-data"
server.groupname = "www-data"
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ("text/plain", "text/html", "application/x-javascript", "text/css")
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
$HTTP["remoteip"] =~ "127.0.0.1" {
alias.url += (
"/doc/" => "/usr/share/doc/",
"/images/" => "/usr/share/images/"
)
$HTTP["url"] =~ "^/doc/|^/images/" {
dir-listing.activate = "enable"
}
}
My repos are in /home/myrepo/proj1 and proj2. In bouth i have a single html file and then I use add and commit them. The mercurial was installed using apt-get. I put hgwebdir.cgi in /var/www/test directory. Here is my hgwebdir file
Code:
!/usr/bin/env python
from mercurial import demandimport; demandimport.enable()
import os
os.environ["HGENCODING"] = "UTF-8"
from mercurial.hgweb.hgwebdir_mod import hgwebdir
from flup.server.fcgi import WSGIServer
WSGIServer(hgwebdir('hgweb.config')).run()
My hgwebdir.config is as follow
Code:
[paths]
proj1 = /home/myrepo/proj1 // proj 1 mean that repo is accessible under ip/test/proj1?
proj2 = /home/myrepo/proj2
And the problem is that id doesn't work. When I open ip/test/ nothing happen on ip/test/proj1 I is 404 error page not found. Where is mistake?
Thx in advice for any help.
Best regards
Artur