4

I am trying to set up QGIS Server in a leaflet client. Everything works fine, except that I get a QGIS logo watermark on each tile, which obviously is not so great.

WMS result Here is my WMS request:

http://0.0.0.0/cgi-bin/qgis_mapserv.fcgi? map=map.qgs& SERVICE=WMS& VERSION=1.3.0& REQUEST=GetMap& BBOX=37,-122,38,-121.7& CRS=EPSG:4326& WIDTH=722& HEIGHT=352& LAYERS=map& STYLES=default& FORMAT=image/png& DPI=96& TRANSPARENT=true

I have searched everywhere but I can't seem to find where to remove it.

Did anyone face the same problem?

7

If anyone encounters the same problem: I installed QGIS Server with a tutorial that made me install HelloServer. It is a nice little tool with which you have quick confirmation that your server is set up.

However it puts this QGIS logo in all your WMS responses. Just delete the plugin, and everything will return to normal.

If you want to keep the plugin but only get rid of the watermark, the file responsible for it is this one.

  • Glad that you got it to work! Did you remove this python module to get rid of the watermarks? If so, please edit and accept your own answer, it'll help those who will hit the same problem in the future :) – Steven Kay Dec 8 '15 at 0:28
  • I removed the whole plugin since I did not need it, but getting rid of the one you linked to is indeed sufficient. – btd Dec 9 '15 at 0:50
2

The Apache configuration you find here enables server plugins :

<VirtualHost *:80>
  ServerAdmin webmaster@localhost
  DocumentRoot /var/www/html

  ErrorLog ${APACHE_LOG_DIR}/qgis-server-error.log
  CustomLog ${APACHE_LOG_DIR}/qgis-server-access.log combined

  # Longer timeout for WPS... default = 40
  FcgidIOTimeout 120
  FcgidInitialEnv LC_ALL "en_US.UTF-8"
  FcgidInitialEnv PYTHONIOENCODING UTF-8
  FcgidInitialEnv LANG "en_US.UTF-8"
  FcgidInitialEnv QGIS_DEBUG 1
  FcgidInitialEnv QGIS_SERVER_LOG_FILE /tmp/qgis-000.log
  FcgidInitialEnv QGIS_SERVER_LOG_LEVEL 0
  FcgidInitialEnv QGIS_PLUGINPATH "/opt/qgis-server/plugins"

  # Needed for QGIS HelloServer 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
      # for apache2 > 2.4
      Require all granted
      #Allow from all
  </Directory>
 </VirtualHost>

You can comment out this line to disable plugins :

#FcgidInitialEnv QGIS_PLUGINPATH "/opt/qgis-server/plugins"

And comment out this part if you use plugins but not the HelloServer one :

  # Needed for QGIS HelloServer plugin HTTP BASIC auth
  #<IfModule mod_fcgid.c>
  #    RewriteEngine on
  #    RewriteCond %{HTTP:Authorization} .
  #    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  #</IfModule>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.