<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Sprechblasentext Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.SprechblasentextZchn
        {mso-style-name:"Sprechblasentext Zchn";
        mso-style-priority:99;
        mso-style-link:Sprechblasentext;
        font-family:"Tahoma","sans-serif";}
span.E-MailFormatvorlage20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi Henrik,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">could you please explain how and where you have set the variable QGIS_AUTH_DB_DIR_PATH? I have set the variable in both the “/etc/environment”
 (for QGIS Desktop) as well as in my vhost file ‘FcgidInitialEnv QGIS_AUTH_DB_DIR_PATH "/usr/local/share/qgis" ‘. QGIS Desktop creates the ‘qgis-auth.db’ at the first start. But I still get the Apache message “ERROR: Auth db directory path could not be created”.
 The directory and the db-file are *writeable* by Server's FCGI process user. What am I doing wrong?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Best regards<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Burghardt<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Von:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Qgis-user [mailto:qgis-user-bounces@lists.osgeo.org]
<b>Im Auftrag von </b>Henrik Uggla<br>
<b>Gesendet:</b> Mittwoch, 28. Oktober 2015 14:38<br>
<b>An:</b> Larry Shaffer<br>
<b>Cc:</b> qgis-user<br>
<b>Betreff:</b> Re: [Qgis-user] Problems with Qgis Server 2.12<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p><span style="font-family:"Calibri","sans-serif";color:black">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!<o:p></o:p></span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black"><o:p> </o:p></span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black">/Henrik<o:p></o:p></span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black">  <o:p></o:p></span></p>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-family:"Calibri","sans-serif";color:#212121">
<hr size="2" width="98%" align="center">
</span></div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:black">Från:</span></b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:black">
<a href="mailto:larry@shafferinteractive.com">larry@shafferinteractive.com</a> <<a href="mailto:larry@shafferinteractive.com">larry@shafferinteractive.com</a>> för Larry Shaffer <<a href="mailto:larrys@dakotacarto.com">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<br>
<b>Ämne:</b> Re: [Qgis-user] Problems with Qgis Server 2.12</span><span style="font-family:"Calibri","sans-serif";color:#212121">
<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121"> <o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121">Hi Henrik,
<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121">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'.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121">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:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121">* 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). <o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121"><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.<o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121">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.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121">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.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121">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.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121">[0] <a href="https://github.com/dakcarto/QGIS-Enhancement-Proposals/blob/auth-system/qep-14-authentication-system.rst">https://github.com/dakcarto/QGIS-Enhancement-Proposals/blob/auth-system/qep-14-authentication-system.rst</a><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121">[1] <a href="https://github.com/qgis/QGIS/blob/master/src/server/qgsserver.cpp#L359-L362">https://github.com/qgis/QGIS/blob/master/src/server/qgsserver.cpp#L359-L362</a><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121">[2] <a href="https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidinitialenv">https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidinitialenv</a><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121">[3] <a href="http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html">http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html</a>  (-initial-env options)<o:p></o:p></span></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121">Regards,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121"><br>
Larry Shaffer<br>
Dakota Cartography<br>
Black Hills, South Dakota<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif";color:#212121">QGIS Support/Development | </span><span style="font-family:"Calibri","sans-serif";color:#212121"><a href="http://boundlessgeo.com/" target="_blank"><span style="font-family:"Arial","sans-serif"">Boundless</span></a><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121">On Tue, Oct 27, 2015 at 4:43 AM, Henrik Uggla <<a href="mailto:Henrik.Uggla@kristianstad.se" target="_blank">Henrik.Uggla@kristianstad.se</a>> wrote:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121">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" 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">qgis-user-bounces@lists.osgeo.org</a>> för Andreas Neumann <<a href="mailto:a.neumann@carto.net">a.neumann@carto.net</a>><br>
Skickat: den 27 oktober 2015 05:37<br>
Till: <a href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a><br>
Ämne: Re: [Qgis-user] Problems with Qgis Server 2.12<o:p></o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121"><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">Qgis-user@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" 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">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" 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">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></span></p>
</div>
</div>
</div>
<p class="MsoNormal"><span style="font-family:"Calibri","sans-serif";color:#212121"><o:p> </o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>