Topic on Project:Support desk

Summary by Ssiimi

Solution to my problem is removing the line $wgServer = ""; from LocalSetttings.php

Ssiimi (talkcontribs)

Im trying to Move my wiki from the normal /var/www/html to a , /var/www/wiki.domain.tld

Before the change it was reachable under domain.tld/index.php and there was no other virtualhost running. Now it should be reachable under wiki.domain.tld. Additionally there is another virtualhost running. It did work at one point when the other virtualhost was disabled but when I enabled it it stopped working.

The wiki does Show up but all the content is missing. If I click on edit I see the content but not safe it.

I’m using mediawiki 1.26.3, apache2 and debian 8.5

I tried out some rewrite mod stuff but i just ended up with a 404 or failed apache2 restart

The following is my virtualhost conf:

<VirtualHost *:80>

ServerAdmin #######

ServerName wiki.domain.tld

DocumentRoot /var/www/wiki.domain.tld

DirectoryIndex index.php

ErrorLog ${APACHE_LOG_DIR}/error.log

CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Edit: Solution to my problem is removing the line $wgServer = ""; from LocalSetttings.php

Ciencia Al Poder (talkcontribs)

Could you detail what do you mean by "content is missing"? do you mean content is there but no images/styles, only text, or no content at all? The latter shouldn't happen in recent versions. About styles, you may need to change some variables in LocalSettings.php that may still point to the old URL scheme ($wgServer, $wgScriptPath, etc).

After that, you'll probably need to purge some caches, since MediaWiki may have cached contents with the old URL scheme. You should run purgeParserCache.php to purge the parser cache and update.php to refresh other caches like the module_deps table.

Ssiimi (talkcontribs)

there is no content at all(The wiki itself loads but all the stuff I wrote myself is not there).

I did change these two variables to this:

$wgScriptPath = "";

$wgServer = "";

If i change it to

$wgServer = "wiki.domain.tld";

It seems to go into a circle and loads the following:

http://wiki.domain.tld/index.php/wiki.domain.tld/index.php/wiki.domain.tld/index.php/Wiki.domain.tld/index.php/wiki.domain.tld/index.php/Wiki.domain.tld/index.php/wiki.domain.tld/index.php/Wiki.domain.tld/index.php/wiki.domain.tld/index.php/Wiki.domain.tld/index.php/wiki.domain.tld/index.php/Wiki.domain.tld/index.php/wiki.domain.tld/index.php/Wiki.domain.tld/index.php/wiki.domain.tld/index.php/Wiki.domain.tld/index.php/Hauptseite

I did run theses php files but nothing changed, i also rebooted the server itself.

Ciencia Al Poder (talkcontribs)
Gochiusa (talkcontribs)

Make $wgScriptPath = "";

Ssiimi (talkcontribs)

It does look like Manual:Errors and symptoms#All pages have no content, but when editing a page the wiki text is there but I do not use that Version, I have only used 1.26.3.

$wgScriptPath = ""; is already in my LocalSettings.php

I still cannot figure out how to fix this, the following is my LocalSetttings.php

<?php

if ( !defined( 'MEDIAWIKI' ) ) {

exit;

}

$wgSitename = "wiki";

$wgMetaNamespace = "wiki";

$wgScriptPath = "";

$wgServer = "";

$wgResourceBasePath = $wgScriptPath;

$wgLogo = "/images/Logo.png";

$wgEnableEmail = true;

$wgEnableUserEmail = true; # UPO

$wgEmergencyContact = "########";

$wgPasswordSender = "########";

$wgEnotifUserTalk = false; # UPO

$wgEnotifWatchlist = false; # UPO

$wgEmailAuthentication = true;

$wgDBtype = "mysql";

$wgDBserver = "localhost";

$wgDBname = "my_wiki";

$wgDBuser = "#####";

$wgDBpassword = "####";

$wgDBprefix = "";

$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";

$wgDBmysql5 = false;

$wgMainCacheType = CACHE_NONE;

$wgMemCachedServers = array();

$wgEnableUploads = true;

$wgUseInstantCommons = false;

$wgShellLocale = "en_US.utf8";

$wgLanguageCode = "de-ch";

$wgSecretKey = "#########";

$wgUpgradeKey = "#########";

$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright

$wgRightsUrl = "";

$wgRightsText = "";

$wgRightsIcon = "";

$wgDiff3 = "/usr/bin/diff3";

$wgDefaultSkin = "vector";

wfLoadSkin( 'CologneBlue' );

wfLoadSkin( 'Modern' );

wfLoadSkin( 'MonoBook' );

wfLoadSkin( 'Vector' );

$wgShowExceptionDetails = true;

require_once "$IP/extensions/Spoilers/Spoilers.php";

Ssiimi (talkcontribs)

I found what caused the Problem,

$wgServer = "";

I just removed this line from LocalSetttings.php and after that it worked again.