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

+-----------------------------------------------------------------------
| Running mapserver 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 /usr/local/lib, but also
the projection definitions from libgeotiff and proj packages to the
chroot:

# mkdir -p /var/www/usr/local/share/{epsg_csv,proj}
# cp /usr/local/share/epsg_csv/* /var/www/usr/local/share/epsg_csv
# cp /usr/local/share/proj/* /var/www/usr/local/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 /etc/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
