MediaWiki in SubDirectory and SubDomain

I want to install the MediaWiki installation on both http://wiki.mysite.com/ and http://mysite.com/wiki/ , I suppose there’s some kind of trick, I assume that at least With a little work, I can make it work ...

I installed it in a directory with the alias http://mysite.com/wiki/ , then set up another Apache VirtualHost, but now that I go to http://wiki.mysite.com/ , I am redirected to http://wiki.mysite.com/wiki/Main_Page and get an internal server error.

Any thoughts?

+4
source share
1 answer

I just moved my Wiki from /var/www/html/ to /var/www/html/wiki .

I needed to change $wgScriptPath in $wgScriptPath from "" to "/wiki";

Then I needed to restart Apache: /etc/init.d/apache2 restart

Now, by going to my browser at http://46.101.38.186/wiki , the wiki main page displays correctly.

+2
source

Source: https://habr.com/ru/post/1336522/


All Articles