Hi Dieter,

This is possible, but you will have to separate the projects into public and pw-protected projects and use some Apache rewriting rules.

Here is what I did:

cgi-bin/qgis_mapserv.fcgi is the publically available
cgi-bin/qgis_mapserv-eigentum.fcgi is a symbolic link to the main .fcgi

My projects reside in different directories:

projekte/av
projekte/orthofotos

are two publically available project folders

projekte_eigentum/av

is a pw-protected project folder (I mean pw-protected on the web).

-----------------------

Then in the apache-rewrite use the following:

RewriteEngine On
RewriteLog /var/log/apache2/webgis_rewrite.log
RewriteLogLevel 0

#Rewrite Rules for QGIS webclient
# Map /wms to qgis_mapserv.fcgi
RewriteRule ^/wms/(.+)$ /cgi/qgis_mapserv.fcgi?map=/home/www/projekte/$1.qgs [QSA,PT,L] RewriteRule ^/wms-eigentum/(.+)$ /cgi/qgis_mapserv-eigentum.fcgi?map=/home/www/projekte_eigentum/$1.qgs [QSA,PT,L]

# Map /maps to /qgis-web-client
# First handle the mapping of the starting html file
RewriteRule ^/maps/([^/.]+/{0,1}){1,7}$ /qgis-web-client/qgiswebclient.html [PT,L] RewriteRule ^/maps-eigentum/([^/.]+/{0,1}){1,7}$ /qgis-web-client-eigentum/qgiswebclient.html [PT,L]

#handle all other files except start files (e.g. .css and .js files)
RewriteRule ^/maps/([^/.]+/){1,1}(.*)$ /qgis-web-client/$2 [PT,L]
RewriteRule ^/maps-eigentum/([^/.]+/){1,1}(.*)$ /qgis-web-client-eigentum/$2 [PT,L]

---------------------

Then create a location with a pw-protection mechanism:

<LocationMatch "/qgis-web-client-eigentum/*|/qgis_mapserv-eigentum.fcgi">
        Order allow,deny
Allow from xxx.xxx.xxx.xxx #ip address or range that does not require a pw
        AuthUserFile /etc/apache2/passwords
        AuthGroupFile /etc/apache2/groups
        AuthName "GIS Uster: Eigentum von Liegenschaften"
        AuthType Basic
        Require group eigentumav
        Satisfy any
</LocationMatch>

------------------

Then when using the pw-protected one, you should point to the other wms location (fcgi file), which is just a symbolic link.

Maybe there is a better, more elegant way, but this is how it works for me.

Please let me know if you have a better idea.

Andreas



On Fri, 19 Oct 2012 09:06:27 +0200, Dieter Becker wrote:
Dear QGIS-users,
 
I have got a questions concerning the QGIS-Webclient:
 
I try to implement a webmapping-solution with qgis-server and qgis
webclient.
 
At the moment I have got this application running with
login/password-restriction for the cgi-bin-folder as well as the
webclient itself so that also the WMS-services are
password-protected.
 
Now I would also make it possible to produce some
none-password-protected WMS-services at the same time?
 
Is it possible just to use two cgi-bin folders and not to encrypt
the second one?
Did someone of you already has such a system up and running with a
mixture of encrypted and non-encrypted services?
 
best wishes,
 
Dieter

--
--
Andreas Neumann
Böschacherstrasse 10A
8624 Grüt (Gossau ZH)
Switzerland
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to