[FGS] [http] Document root for mapserver

Vincent Letocart vincent.letocart at aeronomie.be
Wed Jun 16 06:52:33 EST 2010


Good afternoon

After installing Mapserver, the challenge is to get it working.
The following question is related to the usage of mapserver
through the webbrowser. I wonder why MapServer is trying 
to find a file at the root of the file system...

When I copy an example file from the tutorial:

     http://biometry.gis.umn.edu/tutorial/example1-1.html

I first want to see if the file is correctly accessed. For instance, 
I put the example with name 'tutorial_1.map', and I call mapserver
from the browser:

     http://mysite:8081/cgi-bin/mapserv?map=/tutorial_1.map&layer=states&mode=map

as suggested in the tutorial. In the meantime, I 'strace' the httpd
processes listening on port 8081, and I see in the browser:

	  msLoadMap(): Unable to access file. (/tutorial_1.map) 

and in my trace:

    [pid 10870] open("/tutorial_1.map", O_RDONLY) = -1 ENOENT (No such file or directory)

So, the mapserver works and accept the filename I give to him (tutorial_1.map),
but despite the definitions from the configuration files like
httpd.conf

	<Directory "$FGS_HOME/www/htdocs">
	    Options Indexes FollowSymLinks
	    AllowOverride None
	    Order allow,deny
	    Allow from all
	</Directory>

or mapserver.conf

	Alias /ms_tmp/ "/XXXX/mapserver/tmp/ms_tmp/"
	<Directory  "/XXXX/mapserver/tmp/ms_tmp/">
	    Options None
	    AllowOverride None
	    Order allow,deny
	    Allow from all
	</Directory>

I do not see why the mapserver process is looking at that place
for the mapfile. Moreover, I consider this as dangerous.
And, at the end, I cannot get result of the map file processing.

Did I miss something in the documentation ??

Thanks for your time

Vincent.

-- 
Youth doesn't excuse everything.
		-- Dr. Janice Lester (in Kirk's body), "Turnabout Intruder",
		   stardate 5928.5.


More information about the Foss-gis-suite mailing list