Hi Marcel,

comment below

Am 11.07.2013 11:31, schrieb Marcel Stadelmann:
Hi Bernhard, Andreas,

Now in QGIS it works, but not in the browser (see below).

congrats you mastered the first step

Following I describe what I did to test if the QGIS Server is running,
so maybe somebody else can learn from it. I know it's quite basic, but
in the beginning it may help. I think in my case, it was a path problem.
1. Copy the alaska.shp (+ prj, dbf, shx) to
/Library/WebServer/Documents/ (This is the Web root with Admin rights)
2. In QGIS save a project according the QGIS User Manual 1.8 Chapter
QGIS Server in /Library/WebServer/Documents/
3. Make sure when reopen the QGIS project from
/Library/WebServer/Documents/ it finds still all the layers. (One of my
mistakes was, that I moved the project file afterwards into this folder
and QGIS couldn't find anymore the alaska.shp file. I thought the layer
paths are absolute, but they are not.)

this is in fact controlled by project settings

4. Open a new project and set the crs (i.e. EPSG:2964). Then add a
wms-layer.
5. Connect to localhost with the following url:
http://localhost/qgis-mapserv/qgis_mapserv.fcgi?map=/Library/WebServer/Documents/alaska.qgs
6. 3 layers appear, add the first one.
7. Verify the data are shown.

Am 11.07.2013 um 08:09 schrieb Bernhard Ströbl <bernhard.stro...@jena.de
<mailto:bernhard.stro...@jena.de>>:

Hi Marcel,

I guess now it is time to check for correctness of the srs.
Which srs is the alaska project and data in? Is it EPSG:2964 as your
GetMap request suggests?
Take the GetMap-url and enter it in the browser. Do you get an error
message or a white image? If you get a white image than there is no
data in the bounding box for which you request your image.

The url:
http://localhost/qgis-mapserv/qgis_mapserv.fcgi?map=/Library/WebServer/Documents/alaska.qgs&SERVICE=WMS&REQUEST=GetMap
<http://localhost/qgis-mapserv/qgis_mapserv.fcgi?map=/Library/WebServer/Documents/alaska.qgs&SERVICE=WMS&REQUEST=GetMap>
gives this error massage:
Output format '' is not supported in the GetMap request

What could cause this message?

You left out the format-parameter. I suggest you learn which parameters a GetMap request needs and which are optional. A good starting point would be your server's log file. See how the GetMap requests QGIS desktop issues look like. Try one of those in your browser and play with the paramters.

Bernahrd


Make sure to use the same srs in
1) the server project
2) the data being served with that project
3) your client project (i.e. the project in QGIS desktop you are
trying to load maps into)
I made sure that CRS is everywhere EPSG:2964, but it was not the problem.


Bernhard

Am 10.07.2013 21:59, schrieb Marcel Stadelmann:
Hi Andreas,

yes, with the map parameter I could go a step further, the alaska
layer appeared. But while trying to import it, the following internal
server error was shown:

Kartenabfrage-Fehler [Fehler:Error downloading
http://localhost/qgis-mapserv/qgis_mapserv.fcgi?map=/Library/WebServer/Documents/alaska.qgs&&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=-15256791.5967269185930490,482471.5356363095343113,15452694.4898276831954718,30602207.0081926248967648&CRS=EPSG:2964&WIDTH=1084&HEIGHT=1063&LAYERS=alaska&STYLES=&FORMAT=image/jpeg&DPI=72&MAP_RESOLUTION=72&FORMAT_OPTIONS=dpi:72
<http://localhost/qgis-mapserv/qgis_mapserv.fcgi?map=/Library/WebServer/Documents/alaska.qgs&&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=-15256791.5967269185930490,482471.5356363095343113,15452694.4898276831954718,30602207.0081926248967648&CRS=EPSG:2964&WIDTH=1084&HEIGHT=1063&LAYERS=alaska&STYLES=&FORMAT=image/jpeg&DPI=72&MAP_RESOLUTION=72&FORMAT_OPTIONS=dpi:72>
- server replied: Internal Server Error; URL:
http://localhost/qgis-mapserv/qgis_mapserv.fcgi?map=/Library/WebServer/Documents/alaska.qgs&&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=-15256791.5967269185930490,482471.5356363095343113,15452694.4898276831954718,30602207.0081926248967648&CRS=EPSG:2964&WIDTH=1084&HEIGHT=1063&LAYERS=alaska&STYLES=&FORMAT=image/jpeg&DPI=72&MAP_RESOLUTION=72&FORMAT_OPTIONS=dpi:72]
<http://localhost/qgis-mapserv/qgis_mapserv.fcgi?map=/Library/WebServer/Documents/alaska.qgs&&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=-15256791.5967269185930490,482471.5356363095343113,15452694.4898276831954718,30602207.0081926248967648&CRS=EPSG:2964&WIDTH=1084&HEIGHT=1063&LAYERS=alaska&STYLES=&FORMAT=image/jpeg&DPI=72&MAP_RESOLUTION=72&FORMAT_OPTIONS=dpi:72]>

The layer was somehow imported, i.e. i can open the preferences, but
no data are shown.

Any idea?

Thank you
Marcel

Am 10.07.2013 um 21:15 schrieb Andreas Neumann<a.neum...@carto.net
<mailto:a.neum...@carto.net>>:

Hi Marcel,

You are missing the project file. Did you read the QGIS server tutorial?
See
http://hub.qgis.org/projects/quantum-gis/wiki/QGIS_Server_Tutorial#Map-parameter

Otherwise the server can't know what project you want to access.

First you should start with a map parameter - later on, esp. in a
production environment - you should configure Apache rewriting.

I don't think that OSX is too different from Linux - it least it is more
similar than Windows.

Andreas



Am 10.07.2013 18:33, schrieb Marcel Stadelmann:

Am 10.07.2013 um 16:58 schrieb Andreas Neumann<a.neum...@carto.net>:

Hi Marcel,

If the GetCapabilities command is answering it means that at least
parts
of the QGIS server is running ok.

The WMS server supports the following commands:

GetCapabilities
GetMap
GetLegendGraphic
GetFeatureInfo
GetPrint

The GetCapabilities is always at the start of a session or
connection to
get the service metadata.

In your case it looks like a CRS issue. You should make sure that in
your new empty test project you specify the same projection as in the
Alaska sample project. There are reprojection options - but for a
start
it is easier if server and client are in the same projection. It will
also be faster if no reprojection has to be done.
I tried, but no success. After I delete the
/Library/WebServer/Documents/alaska.qgs file, still 1 layer was
showing up while adding a WMS-Layer. It means the behaviour of the
WMS-Connection is the same with or without the project file
alaska.qgs. So, it's probably not a CRS issue. It seems that the
QGIS Server doesn't see the alaska project file at all.

I connect to the localhost with the url
http://localhost/qgis-mapserv/qgis_mapserv.fcgi? -> Is this correct?

In the QGIS user manual (Chapter QGIS Server) it says that a copy
of qgis_mapserv.fcgi is needed for Linux. But how is it for an OSX?
I found this file in
/Applications/QGIS.app/Contents/MacOS/fcgi-bin/ and put also a copy
of it in /Library/WebServer/Documents/. But somehow I don't
understand how it works… I afraid my QGIS Server configuration is
not correct. But at this point I'm lost.

Is there somewhere a documentation for OSX that explains which file
has to be in which folder?


Once QGIS works fine as a client, you can go on and configure QGIS web
client. Before, it makes no sense and you should first fix the server.

Andreas


Am 10.07.2013 16:34, schrieb Marcel Stadelmann:
Hello Andreas,

I try to do the Alaska example described in the QGIS
Documentation, chapter QGIS Server
(http://docs.qgis.org/1.8/html/de/docs/user_manual/working_with_ogc/ogc_server_support.html).

The problem is, that this example is for Linux. On OSX some
things seem to be a bit different, especially the paths. I saved
the project file with the new project settings in
/Library/WebServer/Documents/alaska.qgs.

In order to test if my QGIS server is running ok, I did two tests:
1. In Safari I put the following url:
http://localhost/qgis-mapserv/qgis_mapserv.fcgi?map=/Library/WebServer/Documents/alaska.qgs&SERVICE=WMS&REQUEST=GetCapabilities

the browser answers with the following message:
WMS Test test text/xml image/jpeg image/png image/png; mode=16bit
image/png; mode=8bit image/png; mode=1bit text/plain text/html
text/xml image/jpeg image/png text/xml svg png pdf text/xml
alaska -179.843 178.454 48.0545 72.2621

I thought this means the server is running. No map is shown
because I still haven't installed the QGIS client. So far so good.

2. In QGIS I wanted to add a WMS-Layer. I connected to the
localhost with the following url:
http://localhost/qgis-mapserv/qgis_mapserv.fcgi?

It shows up 1 layer with ID 0 and name wfslayer, but nothing
more. When I select this layer, it is not possible to import it.
It says: Kein gemeinsames KBS für gewählte Layer. So, I don't
know if my QGIS Server is running ok.

Marcel

Am 10.07.2013 um 14:34 schrieb Andreas Neumann<a.neum...@carto.net>:

Marcel,

Do you mean the layers don't appear in QGIS or in QGIS web
client? This
is an important distinction.

The first means that QGIS server is not installed and configured
correctly, the other means that QGIS server is running ok and
you have a
web client configuration problem.

I know - the getting started it is a bit hard, esp. if you are
on OSX or
Windows where there are fewer users. Most existing users install
and run
QGIS server on Linux.

Andreas

Am 09.07.2013 19:21, schrieb Marcel Stadelmann:
Sorry, I don't get it.

I can connect form QGIS Desktop as a WMS-Client to QGIS Server,
but the Layers don't appear.

Does somebody know a step by step instruction how to configure
a simple example on OSX?

Thanks and regards,
Marcel

Am 09.07.2013 um 18:11 schrieb Bernhard
Ströbl<bernhard.stro...@jena.de>:

anywhere you like and Apache can access them (on a Linux
system file permissions must match, I put them in a
subdirectory of /srv/www)

Bernhard

Am 09.07.2013 17:59, schrieb Marcel Stadelmann:
Where can I see the path to QGIS WMS Server directory? I
don't know
where to save the *.qgs files, so that the QGIS server can
find it.

Thanks and regards,
Marcel

Am 09.07.2013 um 16:36 schrieb Marcel Stadelmann
<marcel.stadelm...@gmx.net<mailto:marcel.stadelm...@gmx.net>>:

Hi Bernhard,

Thanks for the answers.
Am 09.07.2013 um 15:20 schrieb Bernhard Ströbl
<bernhard.stro...@jena.de<mailto:bernhard.stro...@jena.de>>:

Hi Marcel,

the way to call your QGIS server is something like:
http://localhost/qgis-mapserv/qgis_mapserv.fcgi?map=<path_to_your_map>/yourmap.qgs?REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3
<http://localhost/qgis-mapserv/qgis_mapserv.fcgi?map=%3Cpath_to_your_map%3E/yourmap.qgs?REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3>
to get the server's capabilites
be sure to know the possible requests a WMS server can
reply to, see
e.g. [1]

The client accesses the server and not vice versa.
Ok, I think I understand the philosophy.


Steps to do:
1) Install QGIS server (done)
2) Feed QGIS server with a qgis project (*.qgs file)
I saved a QGIS test project with wms capabilites under
/Users/Marcello/Downloads/test/alaska.qgs

The reply of
http://localhost/qgis-mapserv/qgis_mapserv.fcgi?map=/Users/Marcello/Downloads/test/alaska.qgs&SERVICE=WMS&REQUEST=GetCapabilities
<http://localhost/qgis-mapserv/qgis_mapserv.fcgi?map=/Users/Marcello/Downloads/test/alaska.qgs&SERVICE=WMS&REQUEST=GetCapabilities>
in Safari is:
Configuration file problem : perhaps you left off the .qgs
extension?

Does the project path need special permissions?

3) access QGIS server from a WMS client (e.g. QGIS desktop)
to verify
it is running and delivers maps.
Isn't it easier to test this with Safari? In QGIS I tried to
load the
alaska layer through "add wms-layer". But i couldn't connect
to my
localhost. I don't know what url exactly is needed. I tried with
http://localhost/Users/Marcello/Downloads/test/alaska.qgs
but its not
working. The message was:
Antwort nicht verstanden. Der wms-Provider sagte:
Eigenschaften-Abfrage gescheitert: Error downloading
http://localhost/Users/Marcello/Downloads/test/alaska.qgs?SERVICE=WMS&REQUEST=GetCapabilities
<http://localhost/Users/Marcello/Downloads/test/alaska.qgs?SERVICE=WMS&REQUEST=GetCapabilities>
- server replied: Not Found

4) install and configure QWC, see [2]
Where are this kind of projects normally saved in OSX? I
think the QWC
files needs to be saved in the project file (in my case under
/Users/Marcello/Downloads/test)?

Bernhard

[1] http://en.wikipedia.org/wiki/Web_Map_Service
[2]https://github.com/qgis/qgis-web-client


Am 09.07.2013 13:24, schrieb Marcel Stadelmann:
Hi Bernhard,

Thank you for answering. On my Mac the Apache server
works. The QGIS
Server is installed according the Tutorial
http://hub.qgis.org/projects/quantum-gis/wiki/QGIS_Server_Tutorial.
It
also seems to work. When I open the link
http://localhost/qgis-mapserv/qgis_mapserv.fcgi? I get the
following
message from Safari: Please check the value of the REQUEST
parameter.

Now I try to configure and publish a simple QGIS project.
But I don't
know where to put the files. I also don't understand how
the QGIS Server
finds the path to the Web Client, because at the moment I
have the
qgis-web-client folder in /Users/Marcello/Downloads.

Marcel


Am 09.07.2013 um 12:52 schrieb Bernhard Ströbl
<bernhard.stro...@jena.de<mailto:bernhard.stro...@jena.de>
<mailto:bernhard.stro...@jena.de>>:

Hi Marcel,

I am sorry, I do not really understand your question, so
I explain
some things, maybe you can reformulate your question and
people with
Mac OSX knowledge can help you then.
qgis-web-client (QWC) is a JavaScript program to be run
in a browser.
To deliver QWC to the browser of your clients you need a
web server
(e.g. Apache). You can put QWC whereeever your web server
can access
it. QWC needs QGIS Server (a WMS server), normally you
would run QGIS
server on the same machine.

Bernhard

Am 09.07.2013 11:18, schrieb Marcel Stadelmann:
Hi all,

I try to install the qgis-web-client on a Mac OSX
10.8.4. But I don't
understand where exactly I have to put it? I think the
"/home/web/qgis-web-client" path is not for OSX?

regards,
Marcel




__________ Information from ESET Mail Security, version of
virus
signature database 8545 (20130709) __________

The message was checked by ESET Mail Security.
http://www.eset.com<http://www.eset.com/>


_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org<mailto:Qgis-user@lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/qgis-user




__________ Information from ESET Mail Security, version of virus
signature database 8546 (20130709) __________

The message was checked by ESET Mail Security.
http://www.eset.com


_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user



__________ Information from ESET Mail Security, version of
virus signature database 8546 (20130709) __________

The message was checked by ESET Mail Security.
http://www.eset.com




__________ Information from ESET Mail Security, version of
virus signature database 8546 (20130709) __________

The message was checked by ESET Mail Security.
http://www.eset.com


_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user



_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user



_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org <mailto:Qgis-user@lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/qgis-user


__________ Information from ESET Mail Security, version of virus
signature database 8551 (20130710) __________

The message was checked by ESET Mail Security.
http://www.eset.com




__________ Information from ESET Mail Security, version of virus
signature database 8551 (20130710) __________

The message was checked by ESET Mail Security.
http://www.eset.com


_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user



__________ Information from ESET Mail Security, version of virus
signature database 8552 (20130711) __________

The message was checked by ESET Mail Security.
http://www.eset.com


_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user



__________ Information from ESET Mail Security, version of virus signature 
database 8552 (20130711) __________

The message was checked by ESET Mail Security.
http://www.eset.com




__________ Information from ESET Mail Security, version of virus signature 
database 8552 (20130711) __________

The message was checked by ESET Mail Security.
http://www.eset.com


_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to