QGIS Server不工作

时间:2015-03-07 23:36:18

标签: apache qgis

好的家伙我在过去的2,3天里一直坚持这一点,我已经在网上寻找解决方案,我尝试重新安装QGIS Server。但我无法将数字地图加载。

我使用的是Windows Server 2008 R2。

我使用osgeo4w-setup文件安装软件包。

浏览localhost:9090/后安装完成后,我可以看到以下内容。

enter image description here

然后我浏览的下一步:

http://localhost:9090/qgis/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities&map=d:/dgmps/GIS.qgs

我收到以下错误:

enter image description here

在Apache错误日志文件中,我得到了这个:

首先我收到了这个错误:

[Sat Mar 07 00:25:40 2015] [warn] [client 127.0.0.1] (OS 109)The pipe has been ended.  : mod_fcgid: get overlap result error
[Sat Mar 07 00:25:40 2015] [error] [client 127.0.0.1] Premature end of script headers: qgis_mapserv.fcgi.exe

所以我跟踪了所有链接12我可以在网上找到,之后我收到以下错误:

Apache错误日志中的错误日志是:

[Sat Mar 07 23:24:18 2015] [error] [client 127.0.0.1] Premature end of script headers: qgis_mapserv.fcgi.exe
[Sat Mar 07 23:24:18 2015] [error] [client 127.0.0.1] Warning 1: Unable to find driver ECW to unload from GDAL_SKIP environment variable.\r
[Sat Mar 07 23:24:18 2015] [error] [client 127.0.0.1] Warning 1: Unable to find driver ECW to unload from GDAL_SKIP environment variable.\r
[Sat Mar 07 23:24:18 2015] [error] [client 127.0.0.1] Warning 1: Unable to find driver JP2ECW to unload from GDAL_SKIP environment variable.\r
[Sat Mar 07 23:24:18 2015] [error] [client 127.0.0.1] Warning 1: Unable to find driver ECW to unload from GDAL_SKIP environment variable.\r
[Sat Mar 07 23:24:18 2015] [error] [client 127.0.0.1] Warning 1: Unable to find driver JP2ECW to unload from GDAL_SKIP environment variable.\r
[Sat Mar 07 23:24:18 2015] [error] [client 127.0.0.1] QFSFileEngine::open: No file name specified\r
[Sat Mar 07 23:24:18 2015] [error] [client 127.0.0.1] ImportError: No module named site\r

有人知道解决方案吗?

1 个答案:

答案 0 :(得分:2)

答案有点迟,但它可能仍然对某人有所帮助:

  • 将所有.dll从osgeo4w / bin复制到osgeo4w / apps / qgis / bin
  • 将所有.py从osgeo4w / apps / python / Lib复制到osgeo4w / apps / qgis / bin
  • 复制文件夹"编码"从osgeo4w / apps / python / lib到osgeo4w / apps / qgis / bin

修改httpd.conf文件如下(我使用64位,所以在复制粘贴时要小心):

DefaultInitEnv PATH "C:\OSGeo4W64\bin;C:\OSGeo4W64\apps\qgis\bin;C:\OSGeo4W64\apps\grass\grass-@grassversion@\bin;C:\OSGeo4W64\apps\grass\grass-@grassversion@\lib;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem"
DefaultInitEnv QGIS_PREFIX_PATH "C:\OSGeo4W64\apps\qgis"
DefaultInitEnv QT_PLUGIN_PATH "C:\OSGeo4W64\apps\qgis\qtplugins;C:\OSGeo4W64\apps\qt4\plugins"