[mapserver-users] How to point mapserv to my mapfile?

jenia mtl jenia.ivlev at gmail.com
Sat Jul 23 15:46:15 PDT 2016


Hello.


How can I specify the mapfile path to the mapserv fastcgi process?

My problem is that I get a 502 error when try to access
http://localhost/cgi-bin/mapserv?map=/ms4w/apps/tutorial/htdocs/example1-1.map&layer=states&mode=map

I get:

    2016/07/23 17:45:22 [error] 1768#1768: *7 upstream prematurely closed
    FastCGI stdout while reading response header from upstream, client:
    127.0.0.1, server: localhost, request: "GET
    /cgi-bin/mapserv?map=/ms4w/apps/tutorial/htdocs/example1-
1.map&layer=states&mode=map
    HTTP/1.1", upstream: "fastcgi://127.0.0.1:8001", host: "localhost"


This is how I start mapserver:

    `spawn-fcgi   -a 127.0.0.1 -p 8001 /usr/bin/mapserv`


I'm thinking it's because I didn't specify a `mapfile`. And in any case,
I'd like to see the error logs from mapserver (error logs configs go to the
mapfile apperently).

So again, where is the `mapfile` or how do I specify the `mapfile` path for
the `mapserv`instance?


Thanks in advance for your kind help.
Jenia


P.S. This is my nginx config:

    server {

        listen       80;
        server_name  localhost;
        error_log /home/jenia/error.log;
        access_log /home/jenia/access.log;

        location ~ / {
            fastcgi_pass   127.0.0.1:8001;
            error_log /home/jenia/error.log;
            access_log /home/jenia/access.log;
        }
    }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20160723/265f7d99/attachment.htm>


More information about the MapServer-users mailing list