I have a personal wiki running on Ubuntu at work, and at home. I keep the two in sync via script files that copy files (mediawiki folder and mysql folder) from the work wiki to a Dropbox folder. I then copy the changed files down to the home wiki machine (and vice versa). This has worked really well...until now.
The work wiki is at
The home wiki is at
The different base ip addresses has not been a problem until now because I have the following in my
LocalSettings.php to set
## The protocol and server name to use in fully-qualified URLs
#$wgServer = "http://18.104.22.168";
$wgServer = WebRequest::detectServer();
Now, I made a change to my sidebar menu to insert a couple of links to pages down in my wiki. The problem is that these new links are not constructed relative to the dynamic
wgServer ip address:
For example, one link has this URL on BOTH the home and work wiki (after I sync):
How can I change the
http://22.214.171.124 part of the link so it is dynamically recognized regardless of the ip address of the wiki?
p.s. I'm running the wiki's on Ubuntu Mate 20.10 (Groovy Gorilla) on VMware Workstation 16 Pro on Win 10 Pro machines. VMware Workstation hands out ip addresses to the virtual clients and it looks pretty well awful to try and set a static for a client. I'd much rather find a nice wiki solution.