GetSimple CMS with Caddy
I just switched my web server from lighttpd to Caddy! No need to write a script to update my Let’s Encrypt certificates, HTTP/2, etc.: pretty nice. But of course I needed to rewrite my configuration.
Most of it was straightforward. I had to delete some nice things, but in the end even that was OK (I wasn’t even using that anymore).
My biggest issue was to get a test site that uses GetSimple CMS to work with “fancy” URLs (i.e.
/cms/page_name
instead of /cms/index.php?id=page_name
). But in the end it worked with that simple snippet:
hostname {
import common # Snippet for TLS, logging, and security headers
import php # Snippet to enable PHP via PHP-FPM
root /srv/http/hostname/htdocs
rewrite /cms {
r ^/(.+)$
to {path} /cms/?id={1}
}
}
Really simple, but it works!
Comments
Join the conversation by sending an email. Your comment will be added here and to the public inbox after moderation.