[Qgis-user] desperately needing help on QGIS server

Kuan Song songkuan at yahoo.com
Sat May 14 02:51:43 PDT 2016


My apologies for my frustration earlier. A new experiment seems one step closer to a solution. 
I started from a clean ubuntu image again, this time without adding the qgis.org repository and its keys. So I suspect that is the culprit, and would recommend QGIS dev team update the documentation accordingly. 
I'll put the steps at the end of this post.
However, I need to ask more help from the community. Now that the capabilities test is passed, I hope to open a web browser, type in an address, and see the QGIS project pops up in my browser. I've copied my project and data files into /usr/lib/cgi-bin/ directory. What is the magic word next? Thanks!

BTW: pieces of info from QGIS Server on Ubuntu Step-by-step and QGIS Server Python Plugins Ubuntu setup | Open Web Solutions, GIS & Python Development




QGIS Server deploy steps on a clean UBUNTU installation,version 16.04 LTS  1.      Update Ubuntu system$ sudo apt-get update && sudo apt-get upgrade 2.      Setup Apache$ sudo apt-get install apache2 libapache2-mod-fcgid$ # Enable FCGI daemon apache module$ sudo a2enmod fcgid 3.      Install QGIS Server$ sudo apt-get install qgis-server python-qgis###Please do not follow the tutorials overthe internet or the QGIS official guide, in which they add repository and keys.That will only lead to failures!!! 4.      Build a bridge between Apache and QGIS Server,and dedicate port 81 to QGIS server$ sudo a2enmod rewrite      $ sudo gedit /etc/apache2/conf-available/qgis-server-port.conf        ####In this file you type: ‘Listen 81’, then save and quit gedit      $ sudo a2enconf qgis-server-port      $ sudo gedit /etc/apache2/sites-available/001-qgis-server.conf        ####In this file you copy and paste the following chunk, then save and quit gedit      <VirtualHost *:81>        ServerAdminwebmaster at localhost        DocumentRoot /var/www/html             ErrorLog${APACHE_LOG_DIR}/qgis-server-error.log        CustomLog ${APACHE_LOG_DIR}/qgis-server-access.logcombined             # Longer timeout for WPS...default = 40        FcgidIOTimeout 120         FcgidInitialEnv LC_ALL"en_US.UTF-8"        FcgidInitialEnvPYTHONIOENCODING UTF-8        FcgidInitialEnv LANG"en_US.UTF-8"        FcgidInitialEnv QGIS_DEBUG 1        FcgidInitialEnvQGIS_SERVER_LOG_FILE /tmp/qgis-000.log        FcgidInitialEnvQGIS_SERVER_LOG_LEVEL 0        FcgidInitialEnvQGIS_PLUGINPATH "/opt/qgis-server/plugins"             # ABP: needed for QGISHelloServer plugin HTTP BASIC auth        <IfModule mod_fcgid.c>            RewriteEngine on            RewriteCond%{HTTP:Authorization} .            RewriteRule .* -[E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]        </IfModule>             ScriptAlias /cgi-bin//usr/lib/cgi-bin/        <Directory"/usr/lib/cgi-bin">            AllowOverride All            Options +ExecCGI-MultiViews +FollowSymLinks            Require all granted            #Allow from all      </Directory>    </VirtualHost> $ sudo a2ensite 001-qgis-server$ sudo service apache2 restart  5.      Testing server capabilities:In Firefox address bar, type: http://localhost:81/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilitiesIf the browser shows something that beginswith “<WMS_Capabilities version="1.3.0"xsi:schemaLocation="http://www.opengis.net/wmshttp://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsdhttp://www.opengis.net/sldhttp://schemas.opengis.net/sld/1.1.0/sld_capabilities.xsdhttp://www.qgis.org/wmshttp://localhost:81/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS&REQUEST=GetSchemaExtension">”,then the mechanism between apache and QGIS server seems working. 

    On Saturday, May 14, 2016 5:03 PM, Kuan Song <songkuan at yahoo.com> wrote:
 

 Apologize for my frustration earlier. A new experiment seems one step closer to a solution. 
I started from a clean ubuntu image again, this time without adding the qgis.org repository and its keys. So I suspect that is the culprit, and would recommend QGIS dev team update the documentation accordingly. 
I'll put the steps at the end of this post.However, I need to ask more help from the community. Now that the capabilities test is passed, I hope to open a web browser, type in an address, and see the QGIS project pops up in my browser. I've copied my project and data files into /usr/lib/cgi-bin/ directory. What is the magic word next? Thanks!

BTW: combining pieces of info from QGIS Server on Ubuntu Step-by-step and QGIS Server Python Plugins Ubuntu setup | Open Web Solutions, GIS & Python Development

  
|  
|  
|  
|   |    |

  |

  |
|  
|   |  
QGIS Server Python Plugins Ubuntu setup | Open Web Solutions, GIS & Pyt...
 Step by step tutorial on QGIS Server Python plugins Ubuntu 14.04 setup  |   |

  |

  |

 

  
|  
|  
|  
|   |    |

  |

  |
|  
|   |  
QGIS Server on Ubuntu Step-by-step
 This post summarizes my notes about installing QGIS Server on Ubuntu, adding a QGIS project file to the server a...  |   |

  |

  |

 


QGIS Server deploy steps on a clean UBUNTU installation,version 16.04 LTS  1.      1. Update Ubuntu system$ sudo apt-get update && sudo apt-get upgrade 2.      2. Setup Apache$ sudo apt-get install apache2 libapache2-mod-fcgid$ # Enable FCGI daemon apache module$ sudo a2enmod fcgid 3.       3. Install QGIS Server$ sudo apt-get install qgis-server python-qgis###Please do not follow the tutorials overthe internet or the QGIS official guide, in which they add repository and keys.That will only lead to failures!!! 4.       4. Build a bridge between Apache and QGIS Server,and dedicate port 81 to QGIS server$ sudo a2enmod rewrite      $ sudo gedit /etc/apache2/conf-available/qgis-server-port.conf        ####In this file you type: ‘Listen 81’, then save and quit gedit      $ sudo a2enconf qgis-server-port      $ sudo gedit /etc/apache2/sites-available/001-qgis-server.conf        ####In this file you copy and paste the following chunk, then save and quit gedit      <VirtualHost *:81>        ServerAdminwebmaster at localhost        DocumentRoot /var/www/html             ErrorLog${APACHE_LOG_DIR}/qgis-server-error.log        CustomLog ${APACHE_LOG_DIR}/qgis-server-access.logcombined             # Longer timeout for WPS...default = 40        FcgidIOTimeout 120         FcgidInitialEnv LC_ALL"en_US.UTF-8"        FcgidInitialEnvPYTHONIOENCODING UTF-8        FcgidInitialEnv LANG"en_US.UTF-8"        FcgidInitialEnv QGIS_DEBUG 1        FcgidInitialEnvQGIS_SERVER_LOG_FILE /tmp/qgis-000.log        FcgidInitialEnvQGIS_SERVER_LOG_LEVEL 0        FcgidInitialEnvQGIS_PLUGINPATH "/opt/qgis-server/plugins"             # ABP: needed for QGISHelloServer plugin HTTP BASIC auth        <IfModule mod_fcgid.c>            RewriteEngine on            RewriteCond%{HTTP:Authorization} .            RewriteRule .* -[E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]        </IfModule>             ScriptAlias /cgi-bin//usr/lib/cgi-bin/        <Directory"/usr/lib/cgi-bin">            AllowOverride All            Options +ExecCGI-MultiViews +FollowSymLinks            Require all granted            #Allow from all      </Directory>    </VirtualHost> $ sudo a2ensite 001-qgis-server$ sudo service apache2 restart  5.       5. Testing server capabilities:In Firefox address bar, type: http://localhost:81/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilitiesIf the browser shows something that beginswith “<WMS_Capabilities version="1.3.0"xsi:schemaLocation="http://www.opengis.net/wmshttp://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsdhttp://www.opengis.net/sldhttp://schemas.opengis.net/sld/1.1.0/sld_capabilities.xsdhttp://www.qgis.org/wmshttp://localhost:81/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS&REQUEST=GetSchemaExtension">”,then the mechanism between apache and QGIS server seems working. 

    On Saturday, May 14, 2016 2:31 PM, Nicolas Cadieux <nicolas.cadieux at archeotec.ca> wrote:
 

 Hi,Getting a server going can be frustrating at first.  Being kind and calm would help getting the answers you are looking for.Good luck
NicolasOn May 14, 2016 12:21 AM, "Kuan Song [via OSGeo.org]" <[hidden email]> wrote:
>
> Hi Nick,
>
> The QGIS server official documentation link you suggested is a truncated copy from http://www.itopen.it/qgis-server-python-plugins-ubuntu-setup/ . It's truncated because the original post started with apache setup but the QGIS server doc doesn't. 
>
> A newbie user like me had seen both links, and frankly was appalled. 1. Why would an official guide be a half-copy of someone else's work? Where is the respect to copyright? 2. The original page described a helloworld example. helloworld examples in most other projects come with a documentation. Where is the documentation in the case of qgis server? 3. QGIS server was branded 'easiest to use. just put your qgis project file in the folder and it can be seen from browsers'. Where is the documentation and example for that darling functionality? 
>
> The bottom line is: if you want users to use something you invested programming efforts into, please write a detailed and explanatory documentation. The frustration of users will eventually kill the reputation of your dev team. And the time you spend on answering questions will be magnitudes above the time to write a decent documentation.
>
>
>
>
> On Thursday, May 12, 2016 5:56 PM, Nicolas Boisteault <[hidden email]> wrote:
>
>
>  
> Hi,
>  
> You should follow this documentation : http://docs.qgis.org/testing/en/docs/user_manual/working_with_ogc/ogc_server_support.html
>  
> ---
>
> Nicolas BOISTEAULT
> Développeur Web/WebSIG
> Observatoire Régional de l'Environnement
> Téléport 4 Antarès  - BP 50163 - 86962 Futuroscope Chasseneuil Cedex
> Tél : 05 49 49 71 18
>  
> Le 2016-05-12 11:22, Kuan Song a écrit :


>>
>> Dear QGIS community,
>>  
>> I hope to seek your help on how to deploy the QGIS Server on a ubuntu vmware instance.
>> The QGIS server official guide is what I followed. It does not work!!!
>> http://hub.qgis.org/wiki/quantum-gis/QGIS_Server_Tutorial
>>  
>> 1. After I typed in firefox: http://localhost/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities
>>  
>> this is what I got:
>>  
>> Not Found
>>
>> The requested URL /cgi-bin/qgis_mapserv.fcgi was not found on this server.
>> Apache/2.4.18 (Ubuntu) Server at localhost Port 80
>>  
>> 2. I made a QGIS project file with 1 shapefile in it, and put the project file and shapefile in /usr/lib/cgi-bin, as demonstrated in QGIS Server on Ubuntu Step-by-step
>>  
>>  
>>  
>>  
>> QGIS Server on Ubuntu Step-by-step
>> This post summarizes my notes about installing QGIS Server on Ubuntu, adding a QGIS project file to the server a...
>>  
>>  
>> then I typed in firefox: 
>>
>> <a rel="nofollow" shape="rect" id="yiv3101061390yui_3_16_0_ym19_1_1463044097517_4234" target="_blank" onclick="return theMainWindow.showLinkWarning(this)" href="http://10.101.21.28/cgi-bin/vienna/qgis_mapserv.fcgi">http://localhost/cgi-bin/qgis_mapserv.fcgi <a rel="nofollow" shape="rect" id="yiv3101061390yui_3_16_0_ym19_1_1463044097517_4235" target="_blank" onclick="return theMainWindow.showLinkWarning(this)" href="http://10.101.21.28/cgi-bin/vienna/qgis_mapserv.fcgi">
>> I still got this response:
>>  
>> Not Found
>>
>> The requested URL /cgi-bin/qgis_mapserv.fcgi was not found on this server.
>> Apache/2.4.18 (Ubuntu) Server at localhost Port 80
>>  
>> I do not understand what went wrong or where can I get the right advice, as the QGIS server documentation is highly rare, and frankly dubious.
>>  
>> I really love the stated feature of QGIS server: just place a QGIS project on a server, and users can see the contents with any web browser. Could someone in the community help me achieve this?
>>  
>> And to the QGIS developers: please consider writing your documentation with more details and pictures. And it'll be much more helpful to include an executable readme/setup program in the QGIS server distribution, so that us users can have some clue. Thank you!
>>
>>
>> _______________________________________________
>> Qgis-user mailing list
>> [hidden email]
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
>
>
> _______________________________________________ 
> Qgis-user mailing list 
> [hidden email] 
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user 
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://osgeo-org.1560.x6.nabble.com/desperately-needing-help-on-QGIS-server-tp5265974p5266335.html
> To start a new topic under Quantum GIS - User, email [hidden email] 
> To unsubscribe from Quantum GIS - User, click here.
> NAML 
View this message in context: Re: desperately needing help on QGIS server
Sent from the Quantum GIS - User mailing list archive at Nabble.com.

_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

   

  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20160514/19e76f54/attachment.html>


More information about the Qgis-user mailing list