<div dir="ltr">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:<div> FcgidInitialEnv MAPSERVER_CONFIG_FILE "/path/to/your/mapserver.conf"</div><div>In your apache2.conf or one of its includes.</div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 29, 2024 at 2:35 AM Brent Wood via MapServer-users <<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:verdana,helvetica,sans-serif;font-size:16px"><div></div>
<div dir="ltr">do you mean:</div><div dir="ltr"><br></div><div dir="ltr"><div>/etc/apache2/apache2.conf</div><div><br></div><div dir="ltr">Thanks....<br></div><br></div>
</div><div id="m_-4939328839742342118ydp59ec1c96yahoo_quoted_7237833351">
<div style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;color:rgb(38,40,42)">
<div>
On Tuesday, May 28, 2024 at 06:51:01 PM GMT+12, Richard Duivenvoorde <<a href="mailto:rdmailings@duif.net" target="_blank">rdmailings@duif.net</a>> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div dir="ltr">I was in the same position :-)<br clear="none"><br clear="none">What I did on my laptop (running apache):<br clear="none"><br clear="none">In apache.conf you can set it by using:<br clear="none"><br clear="none">SetEnv MAPSERVER_CONFIG_FILE /opt/mapserver/mapserver.conf<br clear="none"><br clear="none">If you use Nginx though (which apparently lacks env variables) I used:<br clear="none"><br clear="none"><a shape="rect" href="https://gist.github.com/lhammond/f59d8db526101e9896d0c9bdd8f15139" rel="nofollow" target="_blank">https://gist.github.com/lhammond/f59d8db526101e9896d0c9bdd8f15139</a><br clear="none"><br clear="none"><a shape="rect" href="https://mkliver.github.io/blog/mapserver-ubuntu-nginx" rel="nofollow" target="_blank">https://mkliver.github.io/blog/mapserver-ubuntu-nginx</a><br clear="none"><br clear="none">But maybe others have better solutions...<br clear="none"><br clear="none">Regards,<br clear="none"><br clear="none">Richard Duivenvoorde<br clear="none"><br clear="none"><br clear="none"><div id="m_-4939328839742342118ydp59ec1c96yqtfd24131"><br clear="none">On 5/28/24 02:52, Brent Wood via MapServer-users wrote:<br clear="none">> Hi,<br clear="none">> <br clear="none">> I'm coming back to mapserver after many years away & have a question. Probably more later...<br clear="none">> <br clear="none">> I'm setting things up & get the error message:<br clear="none">> /msLoadConfig(): Unable to access file. See <a href="http://mapserver.org/mapfile/config.html" target="_blank">mapserver.org/mapfile/config.html</a> for more information.<br clear="none">> /<br clear="none">> /<br clear="none">> /<br clear="none">> I'm running on Linux Mint (Ubuntu) so the default location is presumably /usr/local/etc/mapserver.conf<br clear="none">> <br clear="none">> I have copied/renamed the sample file here & given read access to www-data. Still get the error message.<br clear="none">> <br clear="none">> The docs suggest using the MAPSERVER_CONFIG_FILE environment variable.<br clear="none">> <br clear="none">> I entered the following into the /etc/environment file, which I thought was supposed to work (according to Dr Google),<br clear="none">> MAPSERVER_CONFIG_FILE="/usr/local/etc/mapserver.conf"<br clear="none">> <br clear="none">> 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.<br clear="none">> <br clear="none">> <br clear="none">> Can anyone suggest how/where the environment variable should be set for mapserver to find the file?<br clear="none">> (or any other way to get this working)<br clear="none">> <br clear="none">> I think it would be useful to include this info in the docs, as it is not apparent to me, and perhaps others.<br clear="none">> <br clear="none">> <br clear="none">> _______________________________________________<br clear="none">> MapServer-users mailing list<br clear="none">> <a shape="rect" href="mailto:MapServer-users@lists.osgeo.org" rel="nofollow" target="_blank">MapServer-users@lists.osgeo.org</a><br clear="none">> <a shape="rect" href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="nofollow" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br clear="none"><br clear="none"></div></div></div>
</div>
</div></div>_______________________________________________<br>
MapServer-users mailing list<br>
<a href="mailto:MapServer-users@lists.osgeo.org" target="_blank">MapServer-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr">Richard W. Greenwood<br><a href="http://www.greenwoodmap.com" target="_blank">www.greenwoodmap.com</a></div></div>