Hi everyone,
I'm trying to setup gitweb on my NAS on openwrt.
I have installed lighhttpd and even Luci works.
I am probably having a problem with the correct lighttpd configuration.
I added the file:
root@RpiTestowe:/home/git# cat /etc/lighttpd/conf.d/20-gitweb.conf
server.modules += ( "mod_alias", "mod_cgi", "mod_redirect", "mod_setenv" )
url.redirect += ( "^/gitweb$" => "/gitweb/" )
alias.url += ( "/gitweb/" => "/www/gitweb/" )
$HTTP["url"] =~ "^/gitweb/" {
setenv.add-environment = (
"GITWEB_CONFIG" => "/etc/gitweb.conf",
"PATH" => env.PATH
)
cgi.assign = ( ".cgi" => "/usr/bin/perl" )
server.indexfiles = ( "gitweb.cgi" )
}
In logs I see
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (response.c.458) -- logical -> physical
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (response.c.459) Doc-Root : /www
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (response.c.460) Basedir : /www
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (response.c.461) Rel-Path : /gitweb/
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (response.c.462) Path : /www/gitweb/
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (response.c.479) -- handling physical path
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (response.c.480) Path : /www/gitweb/
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (response.c.487) -- file found
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (response.c.488) Path : /www/gitweb/
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (response.c.649) -- handling subrequest
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (response.c.650) Path : /www/gitweb/
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (configfile-glue.c.614) === start of condition block ===
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (configfile-glue.c.533) 1 (cached) result: false
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (mod_indexfile.c.158) -- handling the request as Indexfile
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (mod_indexfile.c.159) URI : /gitweb/
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (configfile-glue.c.614) === start of condition block ===
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (configfile-glue.c.533) 1 (cached) result: false
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (configfile-glue.c.614) === start of condition block ===
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (configfile-glue.c.533) 1 (cached) result: false
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (configfile-glue.c.614) === start of condition block ===
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (configfile-glue.c.533) 1 (cached) result: false
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (configfile-glue.c.614) === start of condition block ===
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (configfile-glue.c.533) 1 (cached) result: false
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (mod_staticfile.c.205) -- handling file as static file
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (http-header-glue.c.462) not a regular file: /gitweb/ -> /www/gitweb/
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (response.c.661) -- subrequest finished
Thu Nov 22 12:04:39 2018 daemon.err lighttpd[3446]: (response.c.122) Response-Header: \nHTTP/1.1 403 Forbidden\r\nContent-Type: text/html\r\nContent-Length: 345\r\nDate: Thu, 22 Nov 2018 11:04:39 GMT\r\nServer: lighttpd/1.4.48\r\n\r\n
What to change ? What can I check? For now, I want it to be as root - I do it on test hardware (raspberry) before I put it on the target device (NAS)