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/millhousenchurch.com: Website for Immaculate Conception Church, Millhousen

Here is my Caddy snippet, FWIW
(tls) {
tls webmaster@xxxxxxx.com {
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 report-uri.com” "
X-Frame-Options “SAMEORIGIN”
X-XSS-Protection “1; mode=block”
X-Content-Type-Options “nosniff”
Referrer-Policy “strict-origin-when-cross-origin”
-Server
}
}

https://millhousenchurch.com {
        root /var/www/millhousenchurch.com
	gzip
	templates
        import tls
        log /var/www/logs/millhousenchurch.log
        git https://github.com/KennyStier61/millhousenchurch.com.git {
        hook /webhook xxxxxxxxxxxxx
        }
	errors /var/www/logs/millhousenchurch-error.log {
        404 errors/404.html
        }
	browse /bulletins/files /var/www/millhousenchurch.com/templates/browse.html
	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
https://github.com/mholt/caddy/compare/master@{10-09-17}...master@{02-20-18}

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

2 Likes

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.

https://github.com/mholt/caddy/commit/faa5248d1f1c73a1b5ed61a5a321319adae04f5f

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.