[MapServer-users] mapserver.conf question

Richard Greenwood richard.greenwood at gmail.com
Wed May 29 10:58:46 PDT 2024


If you're running MapServer under Apache as a FastCGI (and hopefully you
are because it's much faster than regular CGI) I believe you need:
     FcgidInitialEnv MAPSERVER_CONFIG_FILE "/path/to/your/mapserver.conf"
In your apache2.conf or one of its includes.


On Wed, May 29, 2024 at 2:35 AM Brent Wood via MapServer-users <
mapserver-users at lists.osgeo.org> wrote:

> do you mean:
>
> /etc/apache2/apache2.conf
>
> Thanks....
>
> On Tuesday, May 28, 2024 at 06:51:01 PM GMT+12, Richard Duivenvoorde <
> rdmailings at duif.net> wrote:
>
>
> I was in the same position :-)
>
> What I did on my laptop (running apache):
>
> In apache.conf you can set it by using:
>
> SetEnv MAPSERVER_CONFIG_FILE /opt/mapserver/mapserver.conf
>
> If you use Nginx though (which apparently lacks env variables) I used:
>
> https://gist.github.com/lhammond/f59d8db526101e9896d0c9bdd8f15139
>
> https://mkliver.github.io/blog/mapserver-ubuntu-nginx
>
> But maybe others have better solutions...
>
> Regards,
>
> Richard Duivenvoorde
>
>
>
> On 5/28/24 02:52, Brent Wood via MapServer-users wrote:
> > Hi,
> >
> > I'm coming back to mapserver after many years away & have a question.
> Probably more later...
> >
> > I'm setting things up & get the error message:
> > /msLoadConfig(): Unable to access file. See
> mapserver.org/mapfile/config.html for more information.
> > /
> > /
> > /
> > I'm running on Linux Mint (Ubuntu) so the default location is presumably
> /usr/local/etc/mapserver.conf
> >
> > I have copied/renamed the sample file here & given read access to
> www-data. Still get the error message.
> >
> > The docs suggest using the MAPSERVER_CONFIG_FILE environment variable.
> >
> > I entered the following into the /etc/environment file, which I thought
> was supposed to work (according to Dr Google),
> > MAPSERVER_CONFIG_FILE="/usr/local/etc/mapserver.conf"
> >
> > I still get the error, and if I open a new shell (as me), the variable
> is not set, so that isn't working as I expected.
> >
> >
> > Can anyone suggest how/where the environment variable should be set for
> mapserver to find the file?
> > (or any other way to get this working)
> >
> > I think it would be useful to include this info in the docs, as it is
> not apparent to me, and perhaps others.
> >
> >
> > _______________________________________________
> > MapServer-users mailing list
> > MapServer-users at lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>


-- 
Richard W. Greenwood
www.greenwoodmap.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20240529/689df8de/attachment.htm>


More information about the MapServer-users mailing list