问题
I wish to setup a MediaWiki install on both http://wiki.mysite.com/
and http://mysite.com/wiki/
, I figure there's some kind of trick to it, I assume that with at least a little tinkering I can get this working...
I installed it in a directory which aliased to http://mysite.com/wiki/
, then setup another Apache VirtualHost, but now when I navigate to http://wiki.mysite.com/
I'm redirected to http://wiki.mysite.com/wiki/Main_Page
, and get an internal server error.
Any thoughts?
回答1:
I just moved my Wiki from /var/www/html/
to /var/www/html/wiki
.
I needed to modify $wgScriptPath
in LocalSettings.php
from ""
to "/wiki";
Then I needed to restart Apache: /etc/init.d/apache2 restart
Now navigating my browser to http://46.101.38.186/wiki
correctly displays the main wiki page.
来源:https://stackoverflow.com/questions/4763909/mediawiki-on-subdirectory-and-subdomain