Pages don't load without trailing slash

In Caddy version 0.10.10, a visitor to a site can go to Parish History - Immaculate Conception Church and load a page with the address box adding the trailing slash. Now in 0.11.0, anyone who tries to load Parish History - Immaculate Conception Church (or any URL without the trailing slash for that matter) is given a blank page. Why?

Parish History - Immaculate Conception Church is a real page being served on Caddy
The website is being pulled from GitHub, if seeing the site structure helps any GitHub - MillhousenTech/ Website for Immaculate Conception Church, Millhousen

Here is my Caddy snippet, FWIW
(tls) {
tls {
key_type rsa4096
(expires) {
expires {
match .js$ 1m
# expires js files after 30 days
match .png$ 1y
# expires png files after one year
match .jpg$ 1y
# expires jpg files after one year
match .jpeg$ 1y
# expires jpeg files after one year
match .svg$ 1m
# expires svg files after 30 days
match .pdf$ 1m
# expires pdf file after one month
match .txt$ 1m
# expires txt files after one month
match .html$ 2d
# expires html files after two days
match .css$ 7d
# expires css files after two days
(header) {
header / {
Strict-Transport-Security “max-age=31536000; includeSubDomains; preload”
Public-Key-Pins "pin-sha256=“Vjs8r4z+80wjNcr1YKepWQboSIRi63WsWXhIMN+eWys=”; pin-sha256=“C5+lpZ7tcVwmwQIMcRtPbsQtWLABXhQzejna0wHFr8M=”; pin-sha256=“YLh1dUR9y6Kja30RrAn7JKnbQG/uEtLMkBgFF2Fuihg=”; pin-sha256=“Pr2hOJcdTcz63ucsPIH9XAJazPWZHdSMfAeb9lYWC5Q=”; pin-sha256=“klO23nT2ehFDXCfx3eHTDRESMz3asj1muO+4aIdjiuY=”; pin-sha256=“SMAnK9nweWoTAdwp1LVMG7hJIulUolcsTHwr2h7Kw3Y=”; pin-sha256=“5Flr8i4NX99DWqi7Ot0z2WoboW9myiaH1BvpgRpFMIk=”; includeSubdomains; max-age=2592000; report-uri=“Report URI: Welcome to” "
X-Frame-Options “SAMEORIGIN”
X-XSS-Protection “1; mode=block”
X-Content-Type-Options “nosniff”
Referrer-Policy “strict-origin-when-cross-origin”
} {
        root /var/www/
        import tls
        log /var/www/logs/millhousenchurch.log
        git {
        hook /webhook xxxxxxxxxxxxx
	errors /var/www/logs/millhousenchurch-error.log {
        404 errors/404.html
	browse /bulletins/files /var/www/
	import header
	import expires

Does the blank page still happen if you take out the templates directive?

Huh. It loads the pages fine without the templates directive. Some sites I can take that out, others that I have are built around the templates directive.

So I guess this is a bug with the templates directive?

Yes, probably. Wanna take a stab at fixing it? :smiley:

I would, but don’t have any knowledge of Go or Caddy’s inner workings

I did go through and download and test each release from v0.11.0 (where it doesn’t work) and v0.10.10 (last version I had that worked. In doing so I confirmed that the bug arose in the release of v0.10.11.

That would also mean that one of the commits in here caused the issue{10-09-17}...master@{02-20-18}

If it would help any, I’d be happy to fill out a GitHub issue report!


Great detective work, knowing the versions where it works/doesn’t work will help narrow it down a bit, thanks!

I’ve been looking for a place to dive into Go and help with Caddy.
This commit looks a little suspicious.

If I have time this weekend I can investigate further.

1 Like

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