[Mapserver-users] Re: (no subject)

pkishor_98 pkishor at geoanalytics.com
Fri Mar 28 12:54:20 EST 2003


Hi,

Let me pipe in here --

in addition to the other advice you are getting...

--- In mapserver-users at yahoogroups.com, mapserv at d... wrote:

> -my demo.map file is in the cgi-bin
> -my data directory in in httpdocs (but i will change it to 
> /cgi-bin/data, as 
> you've suggested, once i get the mapserver working).
> -my IMAGEPATH to my data directory
> 
> here is my url i put into the browser to test it:
> 
> http://www.dinequest.us/cgi-bin/mapserv?map=/cgi-
>  

1. your demo.map does not need to be in your cgi-bin directory
2. your data do not need to be in your cgi-bin directory

that they are there may or may not be a problem, but cgi-bin's purpose
is to put scripts that are going to be executed. If they are not going
to be executed, stick them somewhere else.



> 
> here is my updated map file:
> 
> NAME DEMO
> WEB
> 
> IMAGEPATH "/usr/local/psa/home/vhosts/dinequest.us/httpdocs/data/"
> IMAGEURL "http://localhost/data/"
> END
> 
> UNITS DD
> EXTENT -178 16 -66 74
> SIZE 324 210
> SHAPEPATH "/usr/local/psa/home/vhosts/dinequest.us/httpdocs/data/"


so, you are writing your temporary images to the same directory where
you have all your shapefiles also residing. What a mess that will create.

Typically, you want your images to be written to a scratch directory
writeable and readable by the user under which your webserver is
running (usually www or nobody or somesuch).

You want your imageurl to be a relative one so you can move things
around, required (although not mandatory).

You want your data to be somewhere outside your htdocs directory so is
not downloadable by prying eyes.

Best is to make most all pathnames absolute (except for the url).


> 
> LAYER 
>   NAME "states" 
>   DATA dtl_st.shp

you don't need the .shp extension.

Hope this helps.





More information about the mapserver-users mailing list