[Qgis-user] OSGeo4W's QGIS Web Server install problem. “Not Found ... qgis_mapserv.fcgi”

Andreas Neumann a.neumann at carto.net
Sun May 10 23:14:28 PDT 2015


Hi,

The developers (and most users) of QGIS server and web client are on 
Linux - that's the most commen server platform these days - at least in 
Open Source GIS. Windows users are welcome to contribute to the Windows 
aspects of the documentation. Please don't only consume, but also 
contribute.

Regarding ".exe": QGIS web client normally uses only the .fcgi 
extension. If you would want to use .exe instead you would have to 
change line 13 in site/js/GlobalOptions.js to point to the correct path.

Also note: even on Linux there may be stumble blocks to set up QGIS 
server and web client. There are simply a lot of different combinations 
of operating systems and Linux distributions and each one has some 
different ideas how to set up a web server environment (e.g. where the 
Apache conf files are located). And then the next version of the OS may 
decide to change things again.

One good idea when setting up QGIS Server and web client is to go step 
by step.

1. install Apache and make sure it can serve static web pages
2. install the fcgi module and make sure it can execute cgi programs in 
fcgi mode
3. then configure QGIS server and use QGIS Desktop as a WMS client
4. then configure QGIS web client (mainly you have to change 
site/js/GlobalOptions.js - if things fail, use the dev tools in Firefox 
or Chrome to see what URLs are generated and requested.

Hope this helps,

Andreas

On 09.05.2015 10:20, Mats Elfström wrote:
> Hi alla!
> I have also spent far too much time trying to find a working 
> combination of postgis/qgis/qgis server.
> I confess I haven't yet tried all possible permutations, but have more 
> or less given up.
> Why do we have to put up with thsi sorry state of things?
>
> Will somebody with a working installation on a Windows 2012 64 bit 
> server please step forward and tell us how to do it.
>
> Regards, Mats.E
>
> 2015-05-09 8:55 GMT+02:00 Frank Sokolic <sokolic at worldonline.co.za 
> <mailto:sokolic at worldonline.co.za>>:
>
>     Hi Dennis,
>
>     Did you actually rename "qgis_mapserver.fgci.exe" to remove the
>     ".exe" extension? If not, try this as it worked for me.
>
>     Regards, Frank.
>
>
>     On 08/05/2015 21:16, dennis mckay wrote:
>
>
>         I have been spending days trying to start the “Apache OSGeo4W
>         Web Server” on a Win7 Professional SP 1.  I have no experience
>         with Apache.  I have followed the tutorial steps from the QGIS
>         Web Server wiki and Anita Graser's how-to and also other forum
>         advice.  This has led me to upgrading from QGIS 2.4 to 2.6,
>         then to QGIS 2.6 64bit.  Lastly I upgraded Apache from 2.2
>         32bit to 2.4 64bit.  I finally get “It works!” from localhost/
>         using any combination of 32/64bit QGIS or Apache. Trying
>http://localhost/OSGeo4W64/apps/qgis/bin/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities”
>         results in  “Not Found  The requested URL
>         /OSGeo4W/apps/qgis/bin/qgis_mapserv.fcgi was not found on this
>         server.”   This is the error I get no matter what the
>         combination of Apache and QGIS installs – and regardless of
>         including “.exe” with the file name.
>
>         Some recommended actions I took may be obsolete with QGIS 2.6
>         or Apache 2.4.  I am trying to reduce my variables here and
>         need help focusing on where the problems are:  The major
>         adaptations I did, beyond updating .conf files to new Apache
>         2.4 format were:
>
>         1) Disabling references to fcgid and replacing them with cgi
>         (in .conf files).  On newer forum advice, I reverted back to fcgi.
>
>         2) Replacing backslashes with forward in file names as per
>         Apache admonitions.  My confusion: original osgeo installs and
>         forum examples have hybrid examples like
>         "C:\OSGeo4W/apps/ka-map-1.0".  Always with the backslash after
>         C: and no documentation in sight as to the advantages of doing
>         this, if any.
>
>         3) Following a forum advice to copy files from
>         apps\Python27\Lib to apps\qgis\bin.
>
>         4) Upgrading to 64 bit Apache required copying
>         application-specific .conf files from OSGeo4W\httpd.d
>         directory to OSGeo4W64\httpd.d and updating the terminology.
>
>         5) In the URL for qgis_mapserver.fgci.exe, replacing
>         “localhost” with 127.0.0.1 or with my machine's tcp/ip #.
>
>         6) Using the latest version of mod_fcgid.so from Apache lounge.
>
>         Variables in httpd.conf appear to point to the correct
>         directories/files.  I think relevant settings are:
>
>         ServerRoot "C:/OSGeo4W64/Apache24"
>         ServerName  ###.###.#.#:80      [my “IPv4 Address” has real
>         numbers not seen here ]
>         DocumentRoot "C:/OSGeo4W64/Apache24/htdocs"
>         ScriptAlias /cgi-bin/ "C:/OSGeo4W64/apps/Python27/Lib/"   
>         [this is new location for cgi.py,etc.]
>         DirectoryIndex index.html index.html.var index.php index.phtml
>         index.php3
>         Alias /ms_tmp/ "C:/OSGeo4W64/tmp/ms_tmp/"
>
>         “Require all denied” on:
>             Directory “/”
>             FilesMatch “\.ht”
>         “Require all granted” on:
>             Directory "C:/OSGeo4W64/Apache24/htdocs"            
>          [DocumentRoot]
>                  Options Indexes FollowSymLinks Includes
>             Directory “C:/OSGeo4W64/apps/Python27/Lib”            
>         [ScriptAlias /cgi-bin/ ]
>                   Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
>                   SetEnv LD_LIBRARY_PATH "C:/OSGeo4W64/lib"
>             Directory “C:/OSGeo4W64/tmp”                         [ /tmp/ ]
>             Directory “C:/OSGeo4W64/apps/qgis/bin”                  
>          [ /qgis/ ]
>                   SetHandler fcgid-script
>                   Options ExecCGI
>
>         AddHandler cgi-script .cgi
>         AddType application/x-httpd-php .php5 .php4 .php3 .phtml .php
>         Action  application/x-httpd-php "C:/OSGeo4W64/apache24/htdocs"
>
>         Include conf/extra/httpd-autoindex.conf
>         Include conf/extra/httpd-manual.conf
>         Include "C:/OSGeo4W64/httpd.d/httpd_*.conf"
>
>         SetEnv PROJ_LIB "C:/OSGeo4W64/share/proj"
>         SetEnv PATH "C:/OSGeo4W64/bin"
>         SetEnv GDAL_DATA "C:/OSGeo4W64/share/gdal"
>         SetEnv GDAL_DRIVER_PATH "C:/OSGeo4W64/bin/gdalplugins"
>         SetEnv TMP "C:/OSGeo4W64/tmp"
>         SetEnv MS_ERRORFILE "C:/OSGeo4W64/tmp/ms_error.txt"
>         SetEnv MS_DEBUGLEVEL 3
>
>         Question:  Does qgis_mapserv.fgci.exe return good debugging
>         info if run from command line?
>         Question:  What is the format for passing parameters to
>         qgis_mapserv.fgci.exe in the command line?
>         Question:  In Apache .conf files, can quotes in path names be
>         dropped if there are no spaces?
>
>         The Real Question:  Why does my browser not find
>         qgis_mapserver.fgci.exe?
>
>         I am grasping for clues that a seasoned eye would see.  Dennis
>
>
>
>         _______________________________________________
>         Qgis-user mailing list
>         Qgis-user at lists.osgeo.org <mailto:Qgis-user at lists.osgeo.org>
>         http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
>     _______________________________________________
>     Qgis-user mailing list
>     Qgis-user at lists.osgeo.org <mailto:Qgis-user at lists.osgeo.org>
>     http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
>
>
> -- 
> ______________________________________________
> Mats Elfström, Väpplingvägen 21, SE-227 38 LUND, Sweden
> tel: +46 46 145959 / mob: +46 70 595 39 35
> alt e-mail: mats.elfstrom at giskraft.com <mailto:mats.elfstrom at telia.com>
>
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150511/32b8d569/attachment.html>


More information about the Qgis-user mailing list