V2 fcgi transport unrecognised directive

1. My Caddy version (caddy -version):

(devel) with docker-alpine

2. How I run Caddy:

docker

a. System environment:

OS, relevant versions, systemd? docker? etc.
caddy/caddy:alpine

b. Command:

paste command here

c. Service/unit/compose file:

web:
image: caddy/caddy:alpine
#image: abiosoft/caddy:1.0.3-no-stats
restart: unless-stopped
ports:
- 8080:8080
depends_on:
- qgisserver
volumes:
- ./conf/Caddyfile:/etc/caddy/Caddyfile
- ./app:/io/www/html
environment:
ACME_AGREE: “true”
networks:
- net

d. My complete Caddyfile:

localhost:8080

# Set this path to your site's directory.
root * /io/www/html

# Enable the static file server.
file_server

@ows {
    path_regexp map_file ^/ows/(.*)
}

#redir @ows /demos.html?{query}&map=/io/data/{http.regexp.map_file.1}.qgs

# localhost:8080/ows/AV_TH_V1?SERVICE=wms
# directly call QGIS via fcgi
reverse_proxy @ows qgisserver:9993{
    transport fastcgi {
        env QUERY_STRING {query}&map=/io/data/{http.regexp.map_file.1}.qgs
    }
}

3. The problem I’m having:

reloading the Caddy file I get an error saying that the transport directive is not recognised

4. Error messages and/or full log output:

/ $ caddy reload --config /etc/caddy/Caddyfile
2020/02/13 23:44:47.371 INFO using provided configuration {“config_file”: “/etc/caddy/Caddyfile”, “config_adapter”: “”}
reload: adapting config using caddyfile: /etc/caddy/Caddyfile:27: unrecognized directive: transport
/ $

5. What I already tried:

removing the transport block makes the file reload

6. Links to relevant resources:

Oh, you just need a space here: ggisserver:9993{ so it becomes ggisserver:9993 {

No sloppy Caddyfiles :wink: The opening curly brace has to be its own token.

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.