I migrated my MediaWiki install to HestiaCP install and my TLD pages, such as /w/.com don’t work, just says 404. Its some sort of rewrite issue, because I can access it fine if I do /index.php?title=.com so its weird. Any fixes? Here’s my site: https://iiwiki.com/w/.cf_(Thermodoliaverse) and here’s our .htaccess file:
RewriteEngine On
# Don't rewrite these — they are actual files used by MediaWiki
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/w/load\.php
RewriteCond %{REQUEST_URI} !^/w/rest\.php
RewriteCond %{REQUEST_URI} !^/w/resources/
# Rewrite /w/... to index.php
RewriteRule ^/?w(/.*)?$ %{DOCUMENT_ROOT}/index.php [L]
# Redirects /wiki to /w
RewriteRule ^wiki(/.*)?$ /w$1 [R=301,L]
# Rewrite root to index.php
RewriteRule ^/*$ %{DOCUMENT_ROOT}/index.php [L]
That location denies access to all files starting with a dot (.), except for .well-known. In your case, you should create a new Nginx template and remove the existing location block. Once done, assign the new Nginx template to your site.
Warning: Keep in mind that removing this location block will make files starting with a dot (.) accessible. Make sure to check that you don’t have any sensitive files of this type.
In this example I will assume you are using the default template for nginx, your user is test and the domain is example.net.
cd /usr/local/hestia/data/templates/web/nginx
cp default.tpl mediawiki.tpl
cp default.stpl mediawiki.stpl
Now edit mediawiki.tpl and mediawiki.stpl and remove this block: