<div dir="ltr">Hi Tobias,<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 27, 2014 at 3:51 AM, Tobias Brühlmeier <span dir="ltr"><<a href="mailto:tobias.bruehlmeier@xwind.ch" target="_blank">tobias.bruehlmeier@xwind.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
Hi all,</div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">I’m trying to install QGIS Server on Mac OS X Mavericks. Unfortunately, I’m stuck. Hope, somebody has a good hint for me.</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">This is what I have done so far:</div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
INSTALLATION</div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">1) I followed this documentation: <a href="http://hub.qgis.org/projects/quantum-gis/wiki/QGIS_Server_Tutorial" target="_blank">http://hub.qgis.org/projects/quantum-gis/wiki/QGIS_Server_Tutorial</a>. Unfortunately, it’s based on Mac OS X Mountain Lion, but adaptions are very obvious.</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">2) I’ve started on a clean installation of Mavericks (Virtual Machine), with Xcode and Xcode Command Line tools installed, as required.</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">3) I’ve installed QGIS 2.2 and all required plug-ins. Works fine.</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">4) I’ve worked around the Xcode bug via sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">5) I’ve installed mod_fastcgi. The tutorial recommends using Apple’s version of mod_fastcgi, but since I wasn’t able to install it, and since it’s an old version, I’ve chosen Homebrew’s version (Terminal: brew install homebrew/apache/mod_fastcgi), and activated it in /etc/apache2/httpd.conf</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div style="margin:0px"><span style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:13px">6) I’ve created the file </span>/etc/apache2/other/qgis-mapserver.conf, as described.</div>
<div style="margin:0px"><br></div><div style="margin:0px">7) I’ve restarted Apache, and tested it successfully: <a href="http://localhost" target="_blank">http://localhost</a> returns “It works!"</div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">!! 8) Ive tried to test QGIS Server with: <a href="http://localhost/qgis-mapserv/qgis_mapserv.fcgi" target="_blank">http://localhost/qgis-mapserv/qgis_mapserv.fcgi</a>? Here is where trouble begins. According to the documentation, the returned message should be "Configuration file problem”, but instead, it says "Please check the value of the REQUEST parameter”. Couldn’t find a solution for that, and because error log doesn’t show an error, I suppose everything still works fine.</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">PUBLISHING MY FIRST PROJECT</div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">As far as I understand, projects have to be located inside /Applications/QGIS.app/Contents/MacOS/fcgi-bin/: One project folder for every QGIS project.</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">9) I’ve created a project folder /Applications/QGIS.app/Contents/MacOS/fcgi-bin/my_map_project.</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">10) I’ve created a very simple QGIS project called cantons.qgs, taking canton boundaries from a PostGIS database.</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">11) I’ve copied it to /Applications/QGIS.app/Contents/MacOS/fcgi-bin/my_map_project.</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">12) I’ve copied Applications/QGIS.app/Contents/MacOS/fcgi-bin to /Applications/QGIS.app/Contents/MacOS/fcgi-bin/my_map_project.</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">!!!! 13) I tried to start my application with URLs</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">- <a href="http://localhost/qgis-mapserv/my_map_project/qgis_mapserv.fcgi" target="_blank">http://localhost/qgis-mapserv/my_map_project/qgis_mapserv.fcgi</a>?</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">- <a href="http://localhost/qgis-mapserv/my_map_project/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities" target="_blank">http://localhost/qgis-mapserv/my_map_project/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities</a></div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">No success. After some time, my web browser returns:</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">—</div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<span style="font-family:helvetica">Internal Server Error </span><br style="font-family:helvetica"><br style="font-family:helvetica"><span style="font-family:helvetica">The server encountered an internal error or misconfiguration and was unable to complete your request. </span><br style="font-family:helvetica">
<br style="font-family:helvetica"><span style="font-family:helvetica">Please contact the server administrator, </span><a href="mailto:you@example.com" style="font-family:helvetica" target="_blank">you@example.com</a><span style="font-family:helvetica"> and inform them of the time the error occurred, and anything you might have done that may have caused the error. </span><br style="font-family:helvetica">
<br style="font-family:helvetica"><span style="font-family:helvetica">More information about this error may be available in the server error log. </span></div><div style="margin:0px"><font face="helvetica">— </font></div>
<div style="margin:0px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">And Apache’s error log shows: </div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
---</div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><span style="font-family:helvetica">dyld: Library not loaded: @executable_path/../../Frameworks/qgis_core.framework/qgis_core </span><br style="font-family:helvetica">
<span style="font-family:helvetica">  Referenced from: /Applications/QGIS.app/Contents/MacOS/fcgi-bin/my_map_project/qgis_mapserv.fcgi </span><br style="font-family:helvetica"><span style="font-family:helvetica">  Reason: image not found </span><br style="font-family:helvetica">
</div></div></blockquote><div><br></div><div>You have moved the <span style="font-family:helvetica">qgis_mapserv.fcgi binary into a subdirectory, so its </span><span style="font-family:helvetica">@executable_path/../../Framew...etc load path fails. The </span><br>
<span style="font-family:helvetica">qgis_mapserv.fcgi binary needs to stay in the </span><span style="font-family:helvetica">/Applications/QGIS.app/Contents/MacOS/fcgi-bin/ directory because it has 'relative' load paths that point to libraries/frameworks in the QGIS.app bundle.<br>
</span></div><div><br></div><div>You can symlink <span style="font-family:helvetica">qgis_mapserv.fcgi</span> elsewhere, if Apache's user has rights to that location and directives have been set up for the symlink's directory to allow following symlinks. Symlinking is not necessary, though. You do need to make sure the Apache user has read access to the directory of your projects and data, in the same way it needs access to HTML files, etc.<br>
<br></div><div>You can place the project directories where you like, but initially try at the root of your file system, e.g. /qgis, then set the permissions appropriately for the server user's access. When doing this, you will then need to pass the whole path to your project via the MAP parameter, e.g. MAP=/qgis/my-project/project.qgs.<br>
<br></div><div>There are certainly better, more secure setups, but that should get you started.<br><br></div><div>Regards<br><br>Larry Shaffer<br>Dakota Cartography<br>Black Hills, South Dakota<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="word-wrap:break-word">...<div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">This is it. Any ideas?</div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">Best regards, Tobias</div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">
<br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><br><div><div style="font-family:helvetica,arial;font-size:13px"><br></div></div></div><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></blockquote></div><br></div></div>