[mapserver-users] how to specify the location of projection library, how to do it not in map file?

Stephen Woodbridge woodbri at swoodbridge.com
Thu Sep 8 18:28:21 EDT 2011


I would try something like the following in:

/etc/apache2/sites-enabled/000-default

     ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
     <Directory "/usr/lib/cgi-bin">
         AddHandler    fastcgi-script .fcgi
         SetEnv PROJ_LIB "C:/Program Files/Apache Software 
Foundation/Apache2.2/cgi-bin/"
         AllowOverride None
         Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
         Order allow,deny
         Allow from all
     </Directory>

I have not tried this. Probably a good idea to read about it in the 
apache docs. Oh and since I copy and pasted the above block from a Linux 
system and than added your windows path I'm sure the above will not work 
verbatim on either system ;)  but it will hopefully give you a guide.

-Steve W

On 9/8/2011 5:40 PM, JK Chen wrote:
> Hi Steve,
>
> How to do it via Apache configuration? What is the syntax? Is it like this:
> "PROJ_LIB" "./cgi-bin/"
>
> Nope, we can't over-write the path names.
>
> Thanks for your helps.
>
> JK
>
> -----Original Message-----
> From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Stephen Woodbridge
> Sent: Thursday, September 08, 2011 3:06 PM
> To: mapserver-users at lists.osgeo.org
> Subject: Re: [mapserver-users] how to specify the location of projection library, how to do it not in map file?
>
> On 9/8/2011 5:02 PM, Stephen Woodbridge wrote:
>> On 9/8/2011 5:05 PM, JK Chen wrote:
>>> Hi,
>>>
>>> I specify the location proj library in the map file, which points to
>>> apache cgin-bin dirs.. Because we have 32 bit and 64 bit machines,
>>> and the paths of the apache software on those two types machines are
>>> not the same, I end up having two map files.
>>> That creates installation problems for us. I'm wondering if there is
>>> more elegant way to specify the path to proj library?
>>>
>>> In basegn.x32.map
>>> CONFIG "PROJ_LIB" "C:/Program Files/Apache Software
>>> Foundation/Apache2.2/cgi-bin/"
>>> In basegn.x64.map
>>> CONFIG "PROJ_LIB" "C:/Program Files (x86)/Apache Software
>>> Foundation/Apache2.2/cgi-bin/"
>>
>> I believe you can set this up as an environment variable in each
>> apache instance so so it points to the correct file. You would have to
>> do this in the apache config file(s).
>
> See:
>
> http://trac.osgeo.org/mapserver/wiki/EnvironmentVariables
>
> If you can do it in the apache config because you do not have access to it, you could write a simple wrapper script the exports the enviroment variable and then executes mapserver.
>
> -Steve W
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users



More information about the mapserver-users mailing list