CGI on Nginx or how to run man2html on debian¶
I don’t enjoy reading manpages,
man has old clunky interface, however do
enjoy reading documentation in html, some good people developen
tool that is a
CGI script that serves man pages in a browser.
This is why in 2015 year I spend part of an evening trying to configure
modern web server to run CGI scripts. This might not be a suprise, that
nginx doesn’t serve CGI by default. It can serve
FastCGI, which is a
streamlied version of CGI, that unfortunately is incompatible with plain
old CGI scripts.
However there were some other good people that wrote
fcgiwrap, which is a
a wrapper that talks FCGI protocol, and then launches plain old
So to launch
man2html on Debian, you’ll need to:
- Install required software:
aptitude install man2html nginx-full fcgiwrap
- There is a very good example fcgi config at
/usr/share/doc/fcgiwrap/examples/nginx.conf, so just copy it to:
- JUst include
/etc/nginx/fcgiwrap.confin your server config.