IMPORTANT: Per accedir als fitxer de subversion: http://acacha.org/svn (sense password). Poc a poc s'aniran migrant els enllaços. Encara però funciona el subversion de la farga però no se sap fins quan... (usuari: prova i la paraula de pas 123456)

MapServer is an Open Source platform for publishing spatial data and interactive mapping applications to the web. Originally developed in the mid-1990’s at the University of Minnesota, MapServer is released under an MIT-style license, and runs on all major platforms (Windows, Linux, Mac OS X). MapServer is not a full-featured GIS system, nor does it aspire to be.

The MapServer Project Steering Committee (PSC), sanctioned by OSGeo, manages and administers the project which is maintained, improved, and supported by developers and users from around the world. See the community activities page for mailing lists, etc.

Ubuntu

Paquets

Instal·lació

$ sudo apt-get install mapserver-bin mapserver-doc  cgi-mapserver php5-mapscript python-mapscript


Fitxers instal·lats

$ dpkg -L mapserver-bin
/.
/usr
/usr/bin
/usr/bin/legend
/usr/bin/msencrypt
/usr/bin/scalebar
/usr/bin/shp2img
/usr/bin/shp2mysql
/usr/bin/shptree
/usr/bin/shptreetst
/usr/bin/shptreevis
/usr/bin/sortshp
/usr/bin/tile4ms
/usr/share
/usr/share/doc
/usr/share/doc/mapserver-bin
/usr/share/doc/mapserver-bin/copyright
/usr/share/doc/mapserver-bin/changelog.Debian.gz
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/mapserver-bin
$ dpkg -L cgi-mapserver 
/.
/usr
/usr/lib
/usr/lib/cgi-bin
/usr/lib/cgi-bin/mapserv
/usr/share
/usr/share/doc
/usr/share/doc/cgi-mapserver
/usr/share/doc/cgi-mapserver/copyright
/usr/share/doc/cgi-mapserver/changelog.Debian.gz
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/cgi-mapserver

CGI

A Ubuntu Apache està configurat per tal de que les URLs de tipus

http://ELNOSTRESERVIDOR/cgi-bin/EXECUTABLECGI

Executin scripts CGI de la carpeta:

/usr/lib/cgi-bin/

Això és així graciès a la configuració del fitxer:

$ cat /etc/apache2/sites-available/default
<VirtualHost *:80>
	ServerAdmin [email protected]

	DocumentRoot /var/www
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /var/www/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
	</Directory>

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	</Directory>

	ErrorLog ${APACHE_LOG_DIR}/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
       AllowOverride None
       Order deny,allow
       Deny from all
       Allow from 127.0.0.0/255.0.0.0 ::1/128
   </Directory>

</VirtualHost>

Per tant un cop instal·lat el paquet cgi-mapserver

Al instal·lar el executable CGI a:

/usr/lib/cgi-bin/mapserv

Podem utilitzar l'executable amb la URL

http://IP_NOSTRE_SERVIDOR/cgi-bin/mapserv

Resol·lució de problemes. Troubleshooting

No query information to decode. QUERY_STRING is set, but empty

Cal indicar el mapa amb la QUERY STRING:

?map=PATH_AL_MAPA

Per exemple:

?map=/home/sergi/mapes/mapa.map

Pàgina en blanc

L'script es pot executar per línia de comandes:

http://mapserver.org/en/cgi/mapserv.html

Vegeu també

Enllaços externs