It’s hardly a secret that I’ve been using Woltlab Suite Forum for many years on Guild Wars Legacy. And it looks like I set a trend with going with Woltlab, since a lot of other Guild Wars forums these days also use Woltlab (like GW2Community.de)!
But next to Woltlab Suite, I also love using Caddy - it’s a great webserver that requires minimal configuration and it enforces secure defaults. And it also completely handles certificate management and renewal, combined with great performance.
So over the last 3 years, Guild Wars Legacy has been powered on a Ubuntu server with Caddy, but the configuration was a bit ad-hoc and not quite perfect (there were issues with special characters). With the current server move, I set out to finally solve this issue.
The Caddy configuration code
So, without further ado, this is the Woltlab Suite configuration that I use for Guild Wars Legacy, which seems to work almost perfectly:
# Woltlab Suite - Rewrite Rules
# Handle static files and existing directories before rewriting
file_server
# Rule 1: Handle forum paths (but exclude existing files/dirs like acp)
@forum_rewrite {
path_regexp ^/forum/(.*)$
not file
not path_regexp ^/forum/acp/.*$
not path_regexp ^/forum/images/.*$
not path_regexp ^/forum/js/.*$
not path_regexp ^/forum/style/.*$
}
rewrite @forum_rewrite /forum/index.php?{http.regexp.1}&{query}
# Rule 2: Handle everything else (except actual files/dirs and special paths)
@catch_all {
not file
not path /
not path_regexp ^/forum/.*$
not path_regexp ^/acp/.*$
not path_regexp ^/images/.*$
not path_regexp ^/js/.*$
not path_regexp ^/style/.*$
not path_regexp ^/wcf/.*$
not path_regexp ^/tmp/.*$
path_regexp ^/(.*)$
}
rewrite @catch_all /index.php?{http.regexp.1}&{query}
I stick this part between my logging rules and just before I reference the PHP-settings (php_fastcgi).
This has been working great for me so far, should you still encounter issues with this configuration, free free to contact me so I can update it here!
- Kevin