$OpenBSD: README-main,v 1.4 2018/09/04 12:46:14 espie Exp $

+-----------------------------------------------------------------------
| Running ${PKGSTEM} on OpenBSD
+-----------------------------------------------------------------------

If you plan to use mapserv CGI with a chrooted web server, make sure to
copy the libs needed by mapserv binary from ${LOCALBASE}/lib, but also
the projection definitions from libgeotiff and proj packages to the
chroot:

# mkdir -p ${PREFIX-main}${LOCALBASE}/share/{epsg_csv,proj}
# cp ${LOCALBASE}/share/epsg_csv/* ${PREFIX-main}${LOCALBASE}/share/epsg_csv
# cp ${LOCALBASE}/share/proj/* ${PREFIX-main}${LOCALBASE}/share/proj

If you would like to use FastCGI with nginx from base, use the provided rc.d(8)
script and add the following lines to you nginx.conf:

	location /cgi-bin/mapserv {
		fastcgi_pass  unix:run/mapserv.sock;
		fastcgi_param SCRIPT_FILENAME /cgi-bin/mapserv;
		include fastcgi_params;
	}

Another option is to use sysutils/supervisor to start a FastCGI process
pool, using this configuration snippet in ${SYSCONFDIR}/supervisord.d/mapserv.ini:

[fcgi-program:mapserv]
command=/var/www/cgi-bin/mapserv
socket=unix:///var/www/run/%(program_name)s.sock
socket_owner=www
socket_mode=0700
process_name=%(process_num)02d
numprocs=5
user=www
