[mapserver-users] mapserver files to subdomain results in '500Internal Server Error' when mapserv executable accessed through url

Ted Spradley tspradley at snoogems.com
Tue Sep 22 22:09:26 PDT 2009




Daniel Morissette wrote:
> 
> Ted Spradley wrote:
>> 
>> Then I tried setting the environment variable by adding 'SetEnv
>> LD_LIBRARY_PATH /usr/local/lib'
>> to the /var/www/vhosts/domain/conf/httpd.include file as follows:
>> 
>> <VirtualHost xxx.xxx.xxx.xx:80>
>>         ServerName   maps.domain.com:80
>>         SuexecUserGroup         snoogadmin psacln
>>         ServerAdmin  "admin at domain.com"
>>         DocumentRoot /var/www/vhosts/domain.com/subdomains/maps/httpdocs
>>         CustomLog  /var/www/vhosts/domain.com/statistics/logs/access_log
>> plesklog
>>         ErrorLog  /var/www/vhosts/domain.com/statistics/logs/error_log
>>         ScriptAlias  /cgi-bin/ /var/www/cgi-bin/
>>         SetEnv LD_LIBRARY_PATH /usr/local/lib
>> 
>> and restarted Apache, but with the same result of '500 Internal Server
>> Error'.
>> 
> 
> You also need to tell Apache to pass the env var to the CGI environment 
> using PassEnv:
> 
>    PassEnv LD_LIBRARY_PATH
> 
> Daniel
> -- 
> Daniel Morissette
> http://www.mapgears.com/
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 
Thanks Daniel.  It appears I made something simple, complicated.

Ultimately the solution was:

1. setting:

'Options -Includes -ExecCGI' whereas prior to this options were  'Options
-Includes +ExecCGI' 

2. removing the ScriptAlias from the <virtualhost>  context.

'http://maps.domain.com/cgi-bin/mapserv' now returns 'No query information
to decode. QUERY_STRING is set, but empty. ' as expected.

I include various unsuccessful attempts in the event it is helpful to
someone in the future.

#########

I entered the pass env directive into httpd.conf:

PassEnv LD_LIBRARY_PATH

Apache gave the following warning and the internal server error was still
returned.

'Starting httpd: [Tue Sep 22 15:46:08 2009] [warn] PassEnv variable
LD_LIBRARY_PATH was undefined'

I tried entering the pass env directive:
1. after the SetEnv directive :
SetEnv LD_LIBRARY_PATH "/lib:/usr/lib:/usr/local/lib"
PassEnv LD_LIBRARY_PATH

2. without using the SetEnv directive
PassEnv LD_LIBRARY_PATH

3. in Context server config, virtual host, and directory in the above two
combinations

##########

Thanks to all, 
Ted S.
-- 
View this message in context: http://n2.nabble.com/mapserver-files-to-subdomain-results-in-500-Internal-Server-Error-when-mapserv-executable-accessed-tl-tp3687559p3697577.html
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the MapServer-users mailing list