System Management

File Placement

MapServer requires a number of different files to execute. Except for graphics that are referenced in output templates (i.e. web pages) none of the data or configuration files need be accessible via a web server. File naming for the map server follows two rules:

1) Files may be given using their full system path. or
2) Files may be given using a relative path where the path is relative to the location of the file they are being referenced from.
So, for files referenced in the map file they can be given relative to the location of the map file. Same holds true for symbol sets and font sets.

Temporary Files

MapServer also can produce a number of files (i.e. maps, legends, scalebars, etc...). These files must accessible using a web server. To accomplish this MapServer creates these files in a scratch directory. The location of that directory is given using the IMAGEPATH and IMAGEURL parameters in the web section of a map file. The scratch directory must be writable by the user that the web server runs under, usually nobody. It is recommended for security reasons that the web user own the scratch directory rather than making it world writable. The scratch area will need to be cleaned periodically. On busy sites this may need to happen several times an hour. Here's an example shell script that could be run using cron:

    #!/bin/csh

    find /usr/local/www/docs/tmp -follow -name "*.gif" -exec rm {} \;
    

[Homepage]  [Download]  [Documentation]  [Support]  [Gallery]