woodRock / super-telegram

We are migrating an existing Web Map Service (WMS) to a different server. The existing services uses Apache, Postgres, Postgis (psql extention), and Mapserver. The new version of the server has an updated version of both Mapserver and Postgres installed. Between the major versions of Mapserver some of the syntax from the existing Mapfiles is now deprecated.
0 stars 0 forks source link

Refactor Mapfiles #4

Open woodRock opened 3 years ago

woodRock commented 3 years ago

Goal

Update deprecated/redundant syntax for each Mapfile

Tasklist

Success

Each Mapfile that is ready for its current version of Mapserver.

woodRock commented 3 years ago

We encountered an issue on the new server with the PSQL requests in the MapFile. Each layer specifies a CONNECTION. The host was specified as localhost. However, due to the nature of the MapServer software, this creates an external host connection to localhost. Which is not the same as the default connection, where if a host is not specified, localhost is used.

woodRock commented 3 years ago

The solution to the problem mentioned above was to reference the DNS for the server, wellmapsrvdev02, rather than localhost. We also had to add mapserv to as a trusted user on the /etc/postgresql/11/main/postgres.conf for connections from the server to our database. With that change, our MapServer was able to query the database through the cgi-bin without requiring a password. This approach is secure, because we only allow these connections to occur from the IP address of the server itself.