You need to have a configuration file. For Ubuntu this is /user/local/etc/mapserver.conf. It replaces the CONFIG section in the mapfile. See:

https://mapserver.org/mapfile/config.html

Jan

On 10/03/2025 12:10, Atlanta Geek via MapServer-users wrote:
Im building a new osm/mapserver. I am running Ubuntu,nginx,mapserver 8.0
I am getting unable to access file.

My top-level config file looks like the following:

$ cat config.conf

CONFIG

ENV

MS_MAP_PATTERN ".*"

MS_DEBUGLEVEL "5"

MS_ERRORFILE "/tmp/mapserver2.err"

MS_MAPFILE "/usr/local/basemaps/osm-default.map"

END

END


$ pwd

/usr/local/basemaps


When I try validation with my map2img I get a different error

$ map2img -m /usr/local/basemaps/config.conf -all_debug 5 -o output.png

msLoadMap(): Regular expression error. Filename validation failed. <be>


The URL looks like tk the following.


http://10.0.0.231/mapserver?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&MAP=%2Fusr%2Flocal%2Fbasemaps%2Fconfig.conf&LAYERS=default&WIDTH=256&HEIGHT=256&CRS=EPSG%3A3857&STYLES=&BBOX=-9079495.967826376%2C3913575.8482010234%2C-8922952.933898335%2C4070118.8821290643 <http://10.0.0.231/mapserver?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&MAP=%2Fusr%2Flocal%2Fbasemaps%2Fconfig.conf&LAYERS=default&WIDTH=256&HEIGHT=256&CRS=EPSG%3A3857&STYLES=&BBOX=-9079495.967826376%2C3913575.8482010234%2C-8922952.933898335%2C4070118.8821290643>


Any guidance would be appreciated.

--

http://www.atlantageek.com

_______________________________________________
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to