[12:07:39] https://www.mediawiki.org/wiki/Project:Requests/User_rights/Tryvix1509 Looks like no sysop is paying attention to this page [12:24:28] Tryvix1509: it's Xmas day. I'd be concerned if one was. [12:25:04] I suggest you come back when people aren't stuffing their faces with Turkey [21:53:43] hi [22:29:46] Would anyone here be kind as to help me configure my mediawiki w.r.t. my domain name? [22:30:12] I've been trying to follow https://www.mediawiki.org/wiki/Manual:Short_URL/Apache but am losing traction. [22:30:44] I've pointed sap.ient.ai to my box IP (http://108.61.173.103/) [22:31:16] But sap.ient.ai is resolving to http://108.61.173.103/mediawiki/index.php/Main_Page which is ugly [22:32:26] I don't know what work to do in Apache and what work to do in LocalSettings.php [22:33:53] For apache, I think I need to change the webroot from /var/www/html to /var/www/html/mediawiki, which I do by editing /etc/apache2/sites-available/000-default.conf and setting `DocumentRoot /var/www/html/mediawiki` [22:36:37] If I do this, I get "The requested URL was not found on this server.", but if I create a /var/www/html/mediawiki/index.html with foo, this gets rendered. [22:38:08] The original DocumentRoot of /var/www/html was finding /var/www/html/index.html which was a placeholder saying that Apache is installed and serving content. [22:43:11] p-i-: index.html is usually the "default document". However, MediaWiki uses index.php. You need to set index.php as the default document [22:51:29] In /etc/apache2/sites-available/000-default.conf I set `DirectoryIndex index.php`, then I `sudo systemctl restart apache2`, but get a 'Page Not Found' error. [22:51:52] It's showing http://108.61.173.103/mediawiki/index.php/Main_Page in the URL bar tho' (I typed sap.ient.ai) [22:52:51] I wonder if there's a cacheing issue... I'm using an incognito Chrome window, wondering if it might be a DNS cacheing issue on my mac. [22:55:48] incognito should work [22:56:10] try index.php without /Main_Page [22:56:12] No, your webserver is redirected it [22:56:16] % curl -I sap.ient.ai | grep Location [22:56:17] Location: http://108.61.173.103/mediawiki/index.php/Main_Page [22:57:10] that may be a wrong $wgServer, maybe it's set to the ip address instead of the domain name [22:57:12] just use nginx .. [22:57:32] That seems to be suggesting that Apache is executing the index.php, in order to return that location. [22:58:05] yes [22:58:10] if ppl dont run stuff inside container they cant be helped :P [22:58:28] Ah yes, $wgServer is still set to my IP [22:59:15] Is there a resource to a more "modern"/correct way to setup a MediaWiki from scratch? [23:00:01] I followed this HowTo: https://www.atlantic.net/vps-hosting/how-to-install-mediawiki-ubuntu-20-04/ [23:01:07] If I changed my webroot with Apache, I suppose `$wgScriptPath = "/mediawiki";` is also incorrect now... [23:01:23] ... and I should just use "." [23:04:13] p-i-: do not use relative (as in "dot" relative) paths in $wgScriptPath. Use always root relative paths [23:05:11] hmm "If you use a relative URL for $wgArticlePath, it must start with a slash (/)." [23:05:38] So I use "/" instead of "." and now get "http://index.php/Main_Page" with "This site can’t be reached: Check if there is a typo in index.php." [23:14:49] p-i-: can you set $wgScriptPath to an empty string? If it's on the root, using a slash seems to cause problems with other configs [23:17:55] Yes,that works! Now sap.ient.ai loads. Even without any `DirectoryIndex index.php` for Apache. URL-bar is showing http://sap.ient.ai/index.php/Main_Page [23:18:10] Now, to remove the index.php, do I need the .htaccess trick? [23:20:20] You'll need rewrite rules to map between URLs and index.php. However, note that having "pretty URLs" in the form of http://example.com/Main_Page (page names directly in the root) is often problematic and discouraged. Try to add /wiki/ to the path at least