mapserver

GIS CGI server

WWW CVSWeb GITHub
  1. Package version
    mapserver-8.0.1
  2. Maintainer
    Landry Breuil

MapServer is a system for developing web-based GIS applications.
The basic system consists of a CGI program that can be configured to
respond to a variety of spatial requests like making maps, scalebars,
and point, area and feature queries. Virtually all aspects of an
application, from web interface to map appearance can be developed
without any programming.
This package contains the mapserv CGI program.

+-----------------------------------------------------------------------
| 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, use the provided rc.d(8)
script to start a spawn-fcgi process and add the following lines to you nginx.conf:

location /cgi-bin/mapserv {
fastcgi_pass unix:run/mapserv.sock;
fastcgi_split_path_info ^(/cgi-bin/mapserv)(.*)$; # split path for ogcapi support
fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
}

Doing so, make sure /var is mounted with dev option, otherwise spawn-fcgi will
fail opening /dev/null in the chroot.

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

  • devel/swig
  • databases/postgresql,-server
  • php->=8.2,<8.3:lang/php/8.2
  • lang/python/3.10
  • devel/py-setuptools,python3
  • devel/cmake
  • devel/ninja

  • www/spawn-fcgi