Is this a caddy bug or is our server going nuts?

We’re running caddy 0.9.3 for a few weeks now on ubuntu 14.04 lts. So it is still using upstart with
exec /usr/local/bin/caddy -pidfile /var/run/caddy.pid -log /var/log/caddy.log -conf /etc/caddy/caddy.conf

our /etc/caddy/caddy.conf consists just of “import /etc/caddy/conf.d/*”
in /etc/caddy/conf.d/ we define our vhost caddyfile and name them like “website.com” etc
and /etc/caddy/conf.d/website.com could look something like this

website.com {
root /var/www/website.com/web
errors /var/www/website.com/log/error
etc…
}

so far, so good
it worked perfectly fine until today

today i had to reboot the server and caddy didn’t come up properly afterwards
caddy’s upstart logs were full of

2016/10/21 14:27:14 website.com:1 - Parse error: Unknown directive ‘website.com
and other strange parsing errors
2016/10/21 14:28:37 parse //}: invalid character “}” in host name

ehm?!

we are running caddy 0.8.x and 0.9.x on different servers and they are totally fine with our naming and configurations

by now i’ve successfully convinced the stubborn server to run our configurations by renaming them from website1.com, website2.com etc to website1, website2 etc

does anybody have the slightest idea why caddy abruptly doesn’t like our naming anymore?! without any caddy update

You’ll have to share your entire Caddyfile in order for us to help you, since it’s a parse error.

Caddy parsed the file after renaming it and it’s contents didn’t change at all.

But okay: This was one of the problematic vhost caddyfiles

http://shop.belsana-sport.com {
    tls off
    redir https://{host}{uri}
    header / {
        -Server
    }
    root /var/docker/www/shop.belsana-sport.com
}

https://shop.belsana-sport.com {
    errors /var/log/shop.belsana-sport.com.err
    tls admin@permanent.de
    root /var/docker/www/shop.belsana-sport.com

    fastcgi / 127.0.0.1:9002 php {
       env PHP_VALUE "display_errors=off
                        error_log=/var/log/fpm-php.www.log
                        memory_limit = 512M
                        post_max_size=256M
                        log_errors=on
                        upload_max_filesize=256M
                        expose_php=off"
    }

    header / {
       X-Backend-Server {hostname}
       -Server
    }

    rewrite / {
       if {file} not favicon.icorm
        to /maintenance.html {path} {path}/ /shopware.php
    }
}

shop.belsana-sport.com:8080 {
    tls off
    root /var/docker/www/shop.belsana-sport.com
    fastcgi / 127.0.0.1:9002 php
    basicauth / shopadmin ofabamberg
}

naming it shop.belsana-sport.com produces parsing errors
naming it sportshop is totally fine