Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have just installed QGIS server on my Windows 7 machine. The installation went fine after some googling to find all the bits and pieces that needed to be done and I can fetch my get capabilities document and see the test.qgs project I added to the server.

However I can't seem to successfully connect to the service in QGIS, I get the error below.

enter image description here

Is there something on the apache configuration that I have missed which would allow or deny users access to the service?

Thanks

EDIT: Platform: Windows 7, and installed Apache through the OSGEO4W Installer. Okay so I installed apache and QGIS Server through an admin account which was setup by our service desk then it was taken away after the install. So when I run QGIS under my normal account I get the error in the above picture. I asked for the admin account again, chose to open QGIS by going "Run as administrator" and everything worked just fine. I could connect to the wms and see my test service. How do I modify apache to allow access for my regular windows account?

Ando

share|improve this question
    
It sounds like it is working through a web browser OK. Is this correct? –  dakcarto May 25 '12 at 0:28
    
Yeah - on my machine to localhost –  Ando May 25 '12 at 1:21
add comment

4 Answers 4

up vote 1 down vote accepted

Ahhh - Sorry I may not have added all the necessary information in my original question. But here are the details of what worked for me.

I was using a httpProxy in QGIS. In the section "Exclude URLs (starting with)" I added the server name I was trying to access and that solved the access issue.

@dakcarto, I appreciate the speedy assistance you were able to offer.

share|improve this answer
1  
Glad to hear you got it figured. Good to know about the proxy settings possibly affecting the server that way. –  dakcarto Jun 4 '12 at 2:38
add comment

3a. Apache (2.2.14-4 from OSGeo4W) does not have any default IP/port set and it fails to start. Edit the file

c:/osgeo4w/apache/conf/httpd.conf

and change

Listen @apache_port_number@

to your needs, for example, to listen on port 80,use

Listen 80

http://hub.qgis.org/projects/quantum-gis/wiki/QGIS_Server_Tutorial

share|improve this answer
    
Ando mentioned "can fetch my get capabilities document and see the test.qgs project I added to the server." So, I think Apache is already running, and a map is being served. Just fails to connect from within QGIS. –  dakcarto May 25 '12 at 0:26
    
That's correct dakcarto. Apache is operating through port 80 –  Ando May 25 '12 at 1:22
add comment

I'm guessing here, since I haven't used OSGeo4W yet (Mac and Linux, usually), but it looks like you have not defined a MAP parameter in your WMS configuration's URL. According to the MAP parameter description:

"If not specified, QGIS searches for .qgs files in the directory where the server executable is located."

So I think Apache's user doesn't have permission to serve from wherever the qgis_mapserv binary is located.

Try adding the MAP parameter and path to the WMS connection URL ( without the brackets [ ] ):

http://localhost/qgis/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities&MAP=[c:/path/to/your/map.qgs]
share|improve this answer
    
Again that works fine in the browser but will not load the WMS into QGIS. I've never had a problem adding a WMS to QGIS server before, so I think it is definitely something in my apache setup. –  Ando May 25 '12 at 2:52
1  
The last thing I can think of, as far as QGIS is concerned, is underdark's answer here: gis.stackexchange.com/questions/17552/… But I don't see what that would fix, permission-wise. Really curious that it works in a browser but not via QGIS. –  dakcarto May 25 '12 at 3:39
    
Hey Dakcarto - I modified the above question to more accurately reflect the issue. I installed the application from the start under an administrative account and then I was demoted back to a regular user. I am thinking this is what has stuffed me up. –  Ando May 27 '12 at 21:50
add comment

In the QGIS WMS connection dialogue there is “Ignore GetMap URI …” and “Ignore GetFeature URI …”. Checking these options might solve the problem.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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