Re: [mapserver-users] mapserver files to subdomain results in '500Internal Server Error' when mapserv executable accessed through url
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 ad...@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@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] mapserver files to subdomain results in '500Internal Server Error' when mapserv executable accessed through url
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 ad...@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@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. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] mapserver files to subdomain results in '500Internal Server Error' when mapserv executable accessed through url
Typically I would think this is a linking error. That is, the mapserv binary can't find the shared libs it needs to run. You probably need to configure apache further. There's a LD_LIBRARY_PATH env variable that you can look into setting. Steve On 9/21/2009 at 2:03 PM, in message 1253559809841-3687559.p...@n2.nabble.com, Ted Spradley tsprad...@snoogems.com wrote: Hi all, I decided it would be a good idea to move all of my mapping activity to a subdomain: maps.subdomain.com Accessing mapserv by 'http://maps.domain.com/cgi-bin/mapserv' the result is '500 Internal Server Error'. Accessing mapserv by 'http://domain.com/cgi-bin/mapserv' the result is the expected 'No query information to decode. QUERY_STRING is set, but empty. '. access_log shows the two requests converted to the same GET: 1. 'http://domain.com/cgi-bin/mapserv' - [21/Sep/2009:12:40:12 -0500] GET /cgi-bin/mapserv HTTP/1.1 200 249 - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729) 2. 'http://maps.domain.com/cgi-bin/mapserv' - [21/Sep/2009:12:40:20 -0500] GET /cgi-bin/mapserv HTTP/1.1 500 1549 - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729) One gets code 200, Two gets code 500. error_log shows: [Mon Sep 21 12:40:20 2009] [error] [client 98.200.238.238] Premature end of script headers: mapserv mapserv -v MapServer version 5.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=THREADS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE MapServer is now configured for -- Compiler Info - C compiler:gcc -O2 -fPIC -Wall C++ compiler: g++ -O2 -fPIC -Wall Debug: -DNEED_NONBLOCKING_STDERR Generic NINT: -- Renderer Settings - zlib support: -DUSE_ZLIB png support: palette rgba png support: jpeg support: iconv support: -DUSE_ICONV AGG support: AGG Freetype support: Ming(flash) support: PDFLib support: -- Support Libraries - Proj.4 support:-DUSE_PROJ Libxml2 support: -DUSE_LIBXML2 FriBidi support: Curl support: -DUSE_CURL FastCGI support: Threading support: -DUSE_THREAD GEOS support: -- Data Format Drivers --- native tiff support: PostGIS support: -DUSE_POSTGIS EPPL7 support: -DUSE_EPPL ArcSDE support: OGR support: -DUSE_OGR GDAL support: -DUSE_GDAL Oracle Spatial support: -- OGC Services -- WMS Server:-DUSE_WMS_SVR WMS Client:-DUSE_WMS_LYR WFS Server:-DUSE_WFS_SVR WFS Client:-DUSE_WMS_LYR WCS Server:-DUSE_WCS_SVR SOS Server: -- MapScript - PHP MapScript: yes Installation: Fedora 7, Linux Apache/2.2.8 Does anyone have any thoughts about where I may start looking for clues? Thank you, Ted S. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] mapserver files to subdomain results in '500Internal Server Error' when mapserv executable accessed through url
Thanks Steve. I added SetEnv LD_LIBRARY_PATH /usr/local/lib to /etc/httpd/conf/httpd.conf as follows: Directory /var/www/cgi-bin AllowOverride None Options None Order allow,deny Allow from all SetEnv LD_LIBRARY_PATH /usr/local/lib /Directory and restarted Apache, but I know I am only guessing. No success. 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 ad...@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'. Possibly I need to be entering different parameters into the LD_LIBRARY_PATH variable? Thanks again, Ted S Steve Lime wrote: Typically I would think this is a linking error. That is, the mapserv binary can't find the shared libs it needs to run. You probably need to configure apache further. There's a LD_LIBRARY_PATH env variable that you can look into setting. Steve On 9/21/2009 at 2:03 PM, in message 1253559809841-3687559.p...@n2.nabble.com, Ted Spradley tsprad...@snoogems.com wrote: Hi all, I decided it would be a good idea to move all of my mapping activity to a subdomain: maps.subdomain.com Accessing mapserv by 'http://maps.domain.com/cgi-bin/mapserv' the result is '500 Internal Server Error'. Accessing mapserv by 'http://domain.com/cgi-bin/mapserv' the result is the expected 'No query information to decode. QUERY_STRING is set, but empty. '. access_log shows the two requests converted to the same GET: 1. 'http://domain.com/cgi-bin/mapserv' - [21/Sep/2009:12:40:12 -0500] GET /cgi-bin/mapserv HTTP/1.1 200 249 - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729) 2. 'http://maps.domain.com/cgi-bin/mapserv' - [21/Sep/2009:12:40:20 -0500] GET /cgi-bin/mapserv HTTP/1.1 500 1549 - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729) One gets code 200, Two gets code 500. error_log shows: [Mon Sep 21 12:40:20 2009] [error] [client 98.200.238.238] Premature end of script headers: mapserv mapserv -v MapServer version 5.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=THREADS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE MapServer is now configured for -- Compiler Info - C compiler:gcc -O2 -fPIC -Wall C++ compiler: g++ -O2 -fPIC -Wall Debug: -DNEED_NONBLOCKING_STDERR Generic NINT: -- Renderer Settings - zlib support: -DUSE_ZLIB png support: palette rgba png support: jpeg support: iconv support: -DUSE_ICONV AGG support: AGG Freetype support: Ming(flash) support: PDFLib support: -- Support Libraries - Proj.4 support:-DUSE_PROJ Libxml2 support: -DUSE_LIBXML2 FriBidi support: Curl support: -DUSE_CURL FastCGI support: Threading support: -DUSE_THREAD GEOS support: -- Data Format Drivers --- native tiff support: PostGIS support: -DUSE_POSTGIS EPPL7 support: -DUSE_EPPL ArcSDE support: OGR support: -DUSE_OGR GDAL support: -DUSE_GDAL Oracle Spatial support: -- OGC Services -- WMS Server:-DUSE_WMS_SVR WMS Client:-DUSE_WMS_LYR WFS Server:-DUSE_WFS_SVR WFS Client:-DUSE_WMS_LYR WCS Server:-DUSE_WCS_SVR SOS Server: -- MapScript - PHP MapScript: yes Installation: Fedora 7, Linux Apache/2.2.8 Does anyone have any thoughts about where I may start looking for clues? Thank you, Ted S. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- View this message in context: http://n2.nabble.com/mapserver-files-to-subdomain-results-in-500-Internal-Server-Error-when-mapserv-executable-accessed-tl-tp3687559p3689025.html Sent from the Mapserver - User mailing list archive at Nabble.com.