I have installed MoinMoin wiki on a Raspberry Pi 4 with lighttpd using FastCGI following mostly this guide: https://kia.jimmynguyen.co.nz/python/moin/wiki/lighttpd/2020/10/31/moin-wiki-installation-with-lighttpd.html
The problem is that it does not display any of moin static files, so it looks like this:
I am kind of lost and don't know what to look for, so any help will be gold!
I also have Pi-hole running on the same RPi.
I have installed moin with --prefix=/usr/local
and my wiki instance is at /opt/wiki
.
All static files are at /usr/local/lib/python2.7/dist-packages/MoinMoin/web/static/htdocs/
My /etc/lighttpd/lighttpd.conf
looks like this:
server.modules = (
"mod_access",
"mod_accesslog",
"mod_auth",
"mod_expire",
"mod_redirect",
"mod_setenv",
"mod_rewrite",
"mod_fastcgi"
)
server.document-root = "/var/www/html"
server.error-handler-404 = "/pihole/index.php"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error-pihole.log"
server.pid-file = "/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
...
...
...
$HTTP["url"] =~ "^/wiki/" {
fastcgi.server += ( "/" =>
((
"socket" => "/tmp/moin.socket",
"min-procs" => 1,
"max-procs" => 2,
"check-local" => "disable",
"bin-path" => "/opt/wiki/moin.fcgi",
"fix-root-scriptname" => "enable"
))
)
alias.url += ( "/moin_static1911" => "/usr/local/lib/python2.7/dist-packages/MoinMoin/web/static/htdocs/")
}
After investing more time in this subject I followed the HelpOnConfiguration/IntegratingWithLighttpd
advice:
Lighttpd 1.4
MoinMoin is listening in FastCGI mode on port 22000.
$HTTP["url"] =~ "^/wiki" { fastcgi.server = ("/wiki" => ( "mywiki" => ( "host" => "127.0.0.1", "port" => 22000, "check-local" => "disable", "broken-scriptfilename" => "enable" ) )) }
Also, 'alias.url' should not be inside wiki condition and I moved my code to 'external.conf'.
The result:
# Add FastCGI module
server.modules += ( "mod_fastcgi",
"mod_alias"
)
$HTTP["url"] =~ "^/wiki" {
fastcgi.server += ("/wiki" => ( "mywiki" =>
( "socket" => "/tmp/moin.socket",
"min-procs" => 1,
"max-procs" => 2,
"check-local" => "disable",
"bin-path" => "/opt/wiki/moin.fcgi"
)
))
}
alias.url += ( "/moin_static1911" => "/usr/local/lib/python2.7/dist-packages/MoinMoin/web/static/htdocs/")