по этому мануалу. Демо проект скачал отсюда. Положил в свой католог (/home/zaa/workshop-5.4). При запуске демки (нажатие кнопки Initalize) получаю loadWeb(): Unknown identifier. Parsing error near (/home/zaa/workshop-5.4/tmp/):(line 1).
Содержимое файла /etc/apache2/sites-available/default:
Код: Выделить всё
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName mapserverdemo
DocumentRoot /home/zaa/workshop-5.4
<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
ServerSignature On
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>
Код: Выделить всё
<html>
<head>
<title>MapServer Itasca Application</title>
<script language="javascript">
function configure() {
var template = document.demo.template.options[document.demo.template.selectedIndex].value;
var snippet = " TEMPLATE " + template;
document.demo.map_web.value = snippet;
if(template.indexOf("frame") != -1) document.demo.action = "frames.html";
if(template.indexOf("dhtml") != -1) document.demo.action = "frames_dhtml.html";
}
</script>
</head>
<body bgcolor="#FFFFFF">
<center><h2>MapServer Itasca Application (ms v5.4)</h2></center>
<p><hr><p>
This demonstration application will take you through various levels of complexity. Starting with a basic application that
allows a user to pan/zoom and change layers we add:
<ul>
<li> dynamically configured scalebars
<li> javascript-based panning
<li> query results to a frame
<li> and finally, a DHTML rubber-band zoom/query capabilty
</ul>
The base data is the old-reliable Itasca dataset that we know and love...
<form name="demo" method="GET" action="/cgi-bin/mapserv" onSubmit="submit_form()">
<input type="hidden" name="layer" value="lakespy2">
<input type="hidden" name="layer" value="dlgstln2">
<input type="hidden" name="zoomsize" value=2>
<input type="hidden" name="map_web" value="">
<input type="hidden" name="map" value="/home/zaa/workshop-5.4/itasca.map">
<input type="hidden" name="program" value="/cgi-bin/mapserv">
<input type="hidden" name="root" value="/">
<input type="hidden" name="map_web_imagepath" value="/home/zaa/workshop-5.4/tmp/">
<input type="hidden" name="map_web_imageurl" value="/tmp/"
<select name="template" size="1">
<option value="itasca_basic.html"> Basic Application
<option value="itasca_adds_scalebar.html"> -- Adds second scalebar
<option value="itasca_adds_pan.html"> -- Adds pan controls
<option value="itasca_adds_frames.html"> -- Adds frames
<option value="itasca_adds_dhtml.html"> -- Adds dhtml rubber-band box
</select>
<input type="submit" value="Initialize"></center>
</form>
<p><hr>
<table width="100%"><tr><td align="right">This site running MapServer v. 5.4</td></tr></table>
</body>
</html>