<div dir="ltr">Hi Henrik,<div class="gmail_extra">
<br><div class="gmail_quote">On Wed, Oct 28, 2015 at 7:37 AM, Henrik Uggla <span dir="ltr"><<a href="mailto:Henrik.Uggla@kristianstad.se" target="_blank">Henrik.Uggla@kristianstad.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">




<div dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;background-color:rgb(255,255,255)">
<p>I tried to set QGIS_AUTH_DB_DIR_PATH and the error message in the Apache log disappeared. I still got the "WMS configuration error" message though. It turned out to be the map parameter. In 2.8 you did not have to give the map parameter when there were only
 one .qgs-file was present. In 2.12 it is obviously mandatory. Thanks for your input!</p></div></blockquote><div>Hmm. I thought I fixed that issue:</div><a href="http://hub.qgis.org/issues/13291">http://hub.qgis.org/issues/13291</a></div><div class="gmail_quote"><br></div><div class="gmail_quote">The MAP param should not be mandatory if there is a .qgs project file in the same directory as the qgis_mapserv.fcgi. Can you verify this? Also, make sure the project is saved from 2.12 Desktop first, or possibly make a new project just for testing.</div><div class="gmail_quote"><br></div><div class="gmail_quote">If loading a project file from the same directory as the qgis_mapserv.fcgi without using the MAP param does not work, please add a post to the above noted ticket. Thanks.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Regards,<br><br>Larry Shaffer<br>Dakota Cartography<br>Black Hills, South Dakota</div><div class="gmail_quote"><br></div><div class="gmail_quote"><span style="font-family:arial">QGIS Support/Development | </span><a href="http://boundlessgeo.com/" target="_blank" style="font-family:arial">Boundless</a><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;background-color:rgb(255,255,255)">
<p>/Henrik</p>
<p>  <br>
</p>
<div style="color:rgb(33,33,33)">
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>Från:</b> <a href="mailto:larry@shafferinteractive.com" target="_blank">larry@shafferinteractive.com</a> <<a href="mailto:larry@shafferinteractive.com" target="_blank">larry@shafferinteractive.com</a>> för Larry Shaffer <<a href="mailto:larrys@dakotacarto.com" target="_blank">larrys@dakotacarto.com</a>><br>
<b>Skickat:</b> den 27 oktober 2015 19:22<br>
<b>Till:</b> Henrik Uggla<br>
<b>Kopia:</b> Andreas Neumann; qgis-user<div><div class="h5"><br>
<b>Ämne:</b> Re: [Qgis-user] Problems with Qgis Server 2.12</div></div></font>
<div> </div>
</div><div><div class="h5">
<div>
<div dir="ltr">Hi Henrik,
<div><br>
</div>
<div>This is due to the new authentication system in 2.12 [0], and the support I added to Server. When running Server, projects loaded that contain an authentication configuration (instead of clear text username/password) for accessing a secured resource, e.g.
 WMS using Basic Auth and HTTPS, need to be able to access the new 'qgis-auth.db'.</div>
<div><br>
</div>
<div>The auth configurations are encrypted using a master password and stored in the qgis-auth.db, which by default is located at ~/.qgis2/qgis-auth.db for a desktop QGIS user. To enable Server support, I added two environment variables to overcome the problems
 associated with automatically loading projects [1], which are not yet fully documented:</div>
<div><br>
</div>
* QGIS_AUTH_DB_DIR_PATH - Directory where an existing qgis-auth.db is located or created if not present. This directory needs to be *writeable* by Server's FCGI process user (which may differ from Apache's).
<div><br>
* QGIS_AUTH_PASSWORD_FILE - File path to file with master password as first line. This is similar to password files used by database servers. The env variable is read during QGIS startup, then removed from the env variables space, so it is not available later
 on to the FCGI process or any Server plugins. Since all auth configurations are encrypted, a master password is required to access the qgis-auth.db, if a loaded project uses auth configs stored in the qgis-auth.db.</div>
<div>
<div><br>
</div>
<div>What you have found is possibly a bug: the QGIS_AUTH_DB_DIR_PATH is now required to start Server, even if no loaded project make use of the new auth system. This is not really a bug if one considers the auth system setup mandatory from 2.12+, like it is
 on Desktop. At the minimum, a missing/non-writeable qgis-auth.db directory should throw a warning and not an error, allowing Server to launch.</div>
<div><br>
</div>
<div>Please try setting QGIS_AUTH_DB_DIR_PATH to a directory writeable by the Server's FCGI process user and see if Server starts normally. Then check that qgis-auth.db is created in the directory.</div>
<div><br>
</div>
<div>Here is how to set the env variables for the FCGI process in Apache [2,3]. Note, setting them at the Apache process level will not work.</div>
<div><br>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">[0] <a href="https://github.com/dakcarto/QGIS-Enhancement-Proposals/blob/auth-system/qep-14-authentication-system.rst" target="_blank">https://github.com/dakcarto/QGIS-Enhancement-Proposals/blob/auth-system/qep-14-authentication-system.rst</a></div>
<div class="gmail_extra">[1] <a href="https://github.com/qgis/QGIS/blob/master/src/server/qgsserver.cpp#L359-L362" target="_blank">https://github.com/qgis/QGIS/blob/master/src/server/qgsserver.cpp#L359-L362</a></div>
<div class="gmail_extra">[2] <a href="https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidinitialenv" target="_blank">https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidinitialenv</a></div>
<div class="gmail_extra">[3] <a href="http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html" target="_blank">http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html</a>  (-initial-env options)</div>
<div class="gmail_extra">
<div>
<div><br>
</div>
<div>Regards,</div>
<div><br>
Larry Shaffer<br>
Dakota Cartography<br>
Black Hills, South Dakota</div>
</div>
<div><br>
</div>
<div><span style="font-family:arial">QGIS Support/Development | </span><a href="http://boundlessgeo.com/" style="font-family:arial" target="_blank">Boundless</a><br>
</div>
<br>
<div class="gmail_quote">On Tue, Oct 27, 2015 at 4:43 AM, Henrik Uggla <span dir="ltr">
<<a href="mailto:Henrik.Uggla@kristianstad.se" target="_blank">Henrik.Uggla@kristianstad.se</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
It seems to be caused by some file somewhere having wrong permissions. This error is from my Apache log:<br>
ERROR: Auth db directory path could not be created<br>
<br>
Googling the phrase I found this:<br>
<a href="http://qgis.org/api/qgsauthmanager_8cpp_source.html" rel="noreferrer" target="_blank">http://qgis.org/api/qgsauthmanager_8cpp_source.html</a><br>
<br>
Where is this db directory path supposed to be created?<br>
<br>
Henrik<br>
<br>
________________________________________<br>
Från: Qgis-user <<a href="mailto:qgis-user-bounces@lists.osgeo.org" target="_blank">qgis-user-bounces@lists.osgeo.org</a>> för Andreas Neumann <<a href="mailto:a.neumann@carto.net" target="_blank">a.neumann@carto.net</a>><br>
Skickat: den 27 oktober 2015 05:37<br>
Till: <a href="mailto:qgis-user@lists.osgeo.org" target="_blank">qgis-user@lists.osgeo.org</a><br>
Ämne: Re: [Qgis-user] Problems with Qgis Server 2.12<br>
<div>
<div><br>
Hi Henrik,<br>
<br>
Any errors in the Apache log files? Or QGIS server log file?<br>
<br>
Did you specify the map parameter or use an according Apache rewrite rule?<br>
<br>
Is there an X-Server running?<br>
<br>
Andreas<br>
<br>
On 26.10.2015 22:11, Henrik Uggla wrote:<br>
> I'm using Ubuntu 12.04 and upgraded Qgis Server from version 2.8.3 with Ubuntugis dependencies to 2.12 with Ubuntugis dependencies. Now no Qgis Server web services is working anymore. All I get when I try service=WMS&request=GetCapabilities is:<br>
><br>
> <ServiceException code="WMS configuration error"><br>
> There was an error reading the project file or the SLD configuration<br>
> </ServiceException><br>
><br>
> Is anyone else experiencing this?<br>
> _______________________________________________<br>
> Qgis-user mailing list<br>
> <a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">
http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
<br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</div></div></div>
</div>

</blockquote></div><br></div></div>