diff --git a/workshop/content/docs/advanced/apache.md b/workshop/content/docs/advanced/apache.md index 533ee02..b05b627 100644 --- a/workshop/content/docs/advanced/apache.md +++ b/workshop/content/docs/advanced/apache.md @@ -10,11 +10,10 @@ The Apache web server is used by the workshop Docker image. Since version 8.0 Ma At its heart MapServer is a command-line application that can be accessed through a web server. -https://github.com/camptocamp/docker-mapserver/blob/master/runtime/usr/local/bin/start-server +Apache has a [configuration file](https://github.com/MapServer/getting-started-with-mapserver/blob/main/docker/runtime/etc/apache2/conf-enabled/mapserver.conf). +The Docker image uses a [start-up script(https://github.com/MapServer/getting-started-with-mapserver/blob/main/docker/runtime/usr/local/bin/start-server). -Apache has a [configuration file](https://github.com/camptocamp/docker-mapserver/blob/master/runtime/etc/apache2/conf-enabled/mapserver.conf). - -[mod_fcgid module](https://httpd.apache.org/mod_fcgid/), which is an Apache module that provides FastCGI support. +MapServer uses the [mod_fcgid module](https://httpd.apache.org/mod_fcgid/), which is an Apache module that provides FastCGI support. ``` FcgidMaxRequestsPerProcess ${MAX_REQUESTS_PER_PROCESS} @@ -27,7 +26,7 @@ FcgidIOTimeout ${IO_TIMEOUT} These are all documented on the [reference page(https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html). -These all have defaults in the Docker file, but can be overriden using environment variables. +These all have defaults in the Docker file, but can be overridden using environment variables. ``` ENV MS_DEBUGLEVEL=0 \ @@ -42,7 +41,7 @@ ENV MS_DEBUGLEVEL=0 \ ``` -All requests to the server are mapped to `mapserv_wrapper` - a small +All requests to the server are mapped to [mapserv_wrapper](https://github.com/MapServer/getting-started-with-mapserver/blob/main/docker/runtime/usr/local/bin/mapserv_wrapper) - a small wrapper script. ``` ScriptAliasMatch "^${MAPSERVER_BASE_PATH}/(.*)" /usr/local/bin/mapserv_wrapper/$1 diff --git a/workshop/content/docs/index.md b/workshop/content/docs/index.md index dbcfed3..ad570a4 100644 --- a/workshop/content/docs/index.md +++ b/workshop/content/docs/index.md @@ -4,7 +4,7 @@ title: Getting Started with MapServer # Welcome to the Getting Started with MapServer workshop! -Version: 1.0 +Version: 1.1 ![mapserver logo](assets/images/mapserver-banner-large.png) diff --git a/workshop/content/docs/introduction/commandline.md b/workshop/content/docs/introduction/commandline.md index 3aad4e1..a58aeb0 100644 --- a/workshop/content/docs/introduction/commandline.md +++ b/workshop/content/docs/introduction/commandline.md @@ -12,10 +12,10 @@ mapserv -v This should output the MapServer version, along with other details such as PROJ and GDAL versions, and supported input and output formats: ``` -MapServer version 8.4.0 PROJ version 9.5 GDAL version 3.10 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE +MapServer version 8.7-dev PROJ version 9.8 GDAL version 3.13 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER -SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=OGCAPI_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS SUPPORTS=PBF INPUT=JPEG -INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE INPUT=FLATGEOBUF +SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=OGCAPI_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS +INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE INPUT=FLATGEOBUF ``` When run through a web server, data is passed to the `mapserv` application, which generates output that is then sent back through the web server. @@ -27,7 +27,7 @@ To test a URL such as `. As the `mapserv` program returns responses for a web client it also returns HTTP headers. To create a valid image file we need to strip these @@ -56,7 +56,7 @@ mapserv -nh "QUERY_STRING=map=/etc/mapserver/countries.map&mode=map" > /etc/maps We can see all command options using the `--help` switch: ```bash -mapserver --help +mapserv --help ``` All MapServer output can be returned on the command line, not just images. For example, to see a WMS GetCapabilities XML response, run the following command: diff --git a/workshop/content/docs/introduction/docker.md b/workshop/content/docs/introduction/docker.md index 6104d44..a6f00a2 100644 --- a/workshop/content/docs/introduction/docker.md +++ b/workshop/content/docs/introduction/docker.md @@ -4,13 +4,13 @@ We will be using MapServer on a Docker image for the workshop. This ensures that ## Docker MapServer -The MapServer Docker image is provided by [Camptocamp](https://github.com/camptocamp/docker-mapserver), and the Dockerfile is found [here](https://github.com/camptocamp/docker-mapserver/blob/master/Dockerfile). +A custom MapServer Docker image has been created for the workshop, and the Dockerfile is found [here](https://github.com/MapServer/getting-started-with-mapserver/blob/main/docker/Dockerfile). MapServer runs on the Apache web server - see the [Apache page](../advanced/apache.md) page for further details. It uses the Apache [mod_fcgid module](https://httpd.apache.org/mod_fcgid/), module that provides FastCGI support. -MapServer runs on port 80 on the Docker container, which is mapped to port 7000 on the local machine, as can be seen in the Docker compose file +MapServer runs on port `8080` on the Docker container, which is mapped to port `7000` on the local machine, as can be seen in the Docker compose file located at `workshop\exercises\docker-compose.yml`: ```yaml @@ -18,7 +18,7 @@ located at `workshop\exercises\docker-compose.yml`: image: geographika/mapserver-workshop:latest container_name: mapserver ports: - - 7000:80 + - 7000:8080 environment: MAPSERVER_CONFIG_FILE: "/etc/mapserver/mapserver.conf" volumes: @@ -30,7 +30,7 @@ located at `workshop\exercises\docker-compose.yml`: ## JavaScript Application -A second container that serves the JavaScript example pages is also run using Docker. This uses node and runs on port 7001 on both the container and the host machine. +A second container that serves the JavaScript example pages is also run using Docker. This uses Node and runs on port 7001 on both the container and the host machine. ```yaml node: diff --git a/workshop/content/docs/introduction/introduction.md b/workshop/content/docs/introduction/introduction.md index d93823f..6cd4626 100644 --- a/workshop/content/docs/introduction/introduction.md +++ b/workshop/content/docs/introduction/introduction.md @@ -7,8 +7,8 @@ This workshop is divided into the major topics listed below. 1. **Introduction**. An introduction to MapServer and the software used for the workshop. This includes Docker, OpenLayers, and Apache. -2. The **Mapfile**. A Mapfile is MapServer's configuration file. It points -to the data the Map will display, it defines how the data will be displayed, +2. The **Mapfile**. A Mapfile defines a map and its layers in MapServer. It points +to the data the map will display, it defines how the data will be displayed, and how the data will be served to client applications such as an Internet browser. This first set of exercises will help to get familiar with the structure, keywords, and syntax of a Mapfile. @@ -24,7 +24,7 @@ standards as these are free, open and interoperable. 5. **Advanced** topics. These are a collection of miscellaneous exercises that cover a wide range of MapServer functionality. Selected exercises will be chosen based on the needs to the workshop participants. MapServer has over 25 years of development and -features so new topics will be added over time. +features, so new topics will be added over time. ## Workshop Outline diff --git a/workshop/content/docs/mapfile/labels.md b/workshop/content/docs/mapfile/labels.md index 1554d85..9f44374 100644 --- a/workshop/content/docs/mapfile/labels.md +++ b/workshop/content/docs/mapfile/labels.md @@ -42,6 +42,7 @@ GEOMTRANSFORM (centerline(densify([shape], 0.1))) !!! example - Direct MapServer request: + - Inbuilt OpenLayers viewer: - Local OpenLayers example: ??? JavaScript "lakes.js" @@ -61,7 +62,7 @@ GEOMTRANSFORM (centerline(densify([shape], 0.1))) 1. Use a different font for the label by adding the following to the `LABEL` block: `FONT MonsieurLaDoulaise` and increasing the `SIZE` to `28`. The list of fonts available can be found in `workshop/exercises/mapfiles/data/fonts/fontset.txt`. 2. Comment out the `GEOMTRANSFORM (centerline([shape]))` and `ANGLE FOLLOW` lines (using `#`) to see its effect on the map. -3. If you have time, download a font you like from https://fonts.google.com/ and unzip the .TTF file to `workshop/exercises/mapfiles/data/fonts/` +3. If you have time, download a font you like from and unzip the .TTF file to `workshop/exercises/mapfiles/data/fonts/` add a new entry to `fontset.txt` and use this font to draw your Map labels.