MediaWiki and Caddy reddit / selfhosted ---------------------------------------------------------------------- tznkai ยท 2023-12-16 02:16 When I searched for help on this I had a terrible time but I eventually figured it out. Here is what I used with hopes it will help someone in the future. Caddyfile: `mydomain.duckdns.org { @title { not file { try_files {path} {path}/ split_path .php } path_regexp title ^/(.*)$ } rewrite @title /index.php?title={re.title.1}&{query} root * /var/www/html/w #this might be /mediawiki for you php_fastcgi unix//var/run/php/php7.4-fpm.sock #check your version encode gzip #I honestly don't know if this is required file_server` LocalSettings.php: ` ## The URL base path to the directory containing the wiki; ## defaults for all runtime URL paths are based off of this. ## For more information on customizing the URLs ## (like /w/index.php/Page_title to /wiki/Page_title) please see: ## https://www.mediawiki.org/wiki/Manual:Short_URL $wgScriptPath = ""; // note I didn't use /w/ here because my redirect goes straight there # # short url $wgArticlePath = "/wiki/$1"; $wgUsePathInfo = true; `