0

I setup my mediawiki server with apache2.

I use alias to redirect my url to the right location: (/etc/apche2/conf-enabled/mediawiki.conf)

Alias /wiki /var/lib/mediawiki
<Directory /var/lib/mediawiki/>
    Options +FollowSymLinks
    AllowOverride All
    <IfVersion >= 2.3>
            Require all granted
    </IfVersion>
    <IfVersion < 2.3>
            order allow,deny
            allow from all
    </IfVersion>
</Directory>

Problem is that when I access the wiki, it crops my url somehow, which causes issues:

durban.ucl.tch.edu/wiki becomes durban/wiki

Why would the alias change the url? How can I keep the full url with the alias?

Best, Nicolas

Nicolas
  • 2,191
  • 3
  • 29
  • 49
  • It's nothing in this part of the config. It's possible that MediaWiki has a notion of what the outwards name is, so it can put it in links, and that you need to configure that separately. Or maybe it tries to guess -- can you give us the output of `hostname -f`? It should be `durban.ucl.tch.edu`, I'd guess. – Ulrich Schwarz Oct 15 '15 at 15:31
  • yes, hostname -f works as expected (it returns durban.ucl.tch.edu) – Nicolas Oct 15 '15 at 15:32

1 Answers1

0

The mediawiki docs suggests that you can set the $wgServer variable in the mediawiki config like this:

$wgServer = 'http://durban.ucl.tch.edu';

which you may or may not consider a workaround.

Ulrich Schwarz
  • 7,598
  • 1
  • 36
  • 48