QWC2 Server examples

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

QWC2 Server examples

DimK
Hi, all

I have a question about QWC2 Server. Are there some examles about? 

How can I set my QGIS Server reference http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?map=c:\path_to_qgis_project\helloworld.qgs to reference like http://localhost/helloworld ?

Regards,
Dmitry Konoplya

_______________________________________________
qgis-qwc2 mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-qwc2
Reply | Threaded
Open this post in threaded view
|

Re: QWC2 Server examples

Sandro Mani


On 23.03.2017 06:15, DimK wrote:
> Hi, all
>
> I have a question about QWC2 Server. Are there some examles about?
>
> How can I set my QGIS Server reference
> http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?map=c:\path_to_qgis_project\helloworld.qgs
> to reference like http://localhost/helloworld ?
>
Hi

If you use Apache, you can add a RewriteRule like

RewriteEngine on
RewriteRule ^/wms/(.+)$
/qgis/qgis_mapserv.fcgi?map=/path/to/projects/$1.qgs [QSA,PT]
ScriptAlias /qgis/ "/path/to/qgis/bin/"

Then http://localhost/wms/myproject is rewritten to
/path/to/qgis/bin/qgis_mapserv.fcgi?map=/path/to/projects/myproject.qgs

Best
Sandro

_______________________________________________
qgis-qwc2 mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-qwc2