Mediawiki was originally installed by another person on a server before Apache was configured for virtual hosts. I would have just wiped and and installed again were it not for lots of pages we want to keep are now in there. So I'm just trying to manually reconfigure Apache and Mediawiki to get the new virtual URL to work.
Originally the paths everything was installed in was /etc/mediawiki and /var/lib/mediawiki. I have not changed these.
I'm reading this document and trying to apply it to my situation: http://www.mediawiki.org/wiki/Manual:Short_URL
The host is called "fermat" (no TLD), and that is DNS resolved on the internal network. A URL that worked previously was "http://fermat/mediawiki/index.php/Main_Page". Apache now no longer listens on the IP address that "fermat" resolves to, so that URL now gets a connection failure. This is expected. Instead, a new name "wiki" resolves to another IP address. The server has that IP address configured, and so does Apache. Apache listens on it. It does connect. I'm just not getting the contents expected.
Old URL: http://fermat/mediawiki/index.php/Main_Page New URL: http://wiki/wiki/Main_Page
I am also changing the first directory name from "/mediawiki" to just "/wiki". I would have liked to have it even shorter by eliminating this first path altogether, but one document I read said not to do this, so I didn't. I did put in an Apache Alias directive "Alias /wiki /var/lib/mediawiki/index.php" so that I do not have to use "index.php" in the URL.
So I have these in "/etc/mediawiki/LocalSettings.php":
$wgScriptPath = "/mediawiki"; $wgArticlePath = "/wiki/$1"; $wgScriptExtension = ".php";
Previously, $wgArticlePath was not assigned (I added it since the document had that). I copied this from "http://www.mediawiki.org/wiki/Manual:Short_URL#Setup_steps" but left "/mediawiki" NOT changed to "/w" (since I didn't see a need to change the filesystem path, at least not yet).
OK ... so I go to "http://wiki/wiki/Main_Page". I actually get our page contents (the contents we put in there back when it was under the other URL). So it seems mostly I got it right. BUT ... what fails is that get NONE of the prettiness. No CSS, no images, etc. It just looks like it was rendered from plain HTML. Are there other steps which are needed to get that? I don't see any in the "http://www.mediawiki.org/wiki/Manual:Short_URL" document, and don't see any link that suggests that. I would have expected that if more steps are needed, they would be right there with the other steps. So I don't know if this is something missing or something not done right. But I got the right contents, which suggests to me the right script was run in ... maybe ... the right context.
So, anyone have any idea what else needs to be done? A reference to the right document should work (if it's a big one, what section to use).
Are you defining $wgScript to anything? Look at the urls generated for the CSS. They seem to be wrong.
On Tue, Jul 13, 2010 at 16:22, Platonides Platonides@gmail.com wrote:
Are you defining $wgScript to anything? Look at the urls generated for the CSS. They seem to be wrong.
I have now the following:
$wgScriptPath = "/+"; $wgArticlePath = "/$1";
with this in Apache:
Alias /= /home/pub/wiki Alias /+ /var/lib/mediawiki Alias / /var/lib/mediawiki/index.php/
and local DNS giving an IP address for hostname "wiki", and it has been working now, with URLs like:
Yes, I know this means I cannot make an article with a name beginning with "+".
Phil Howard wrote:
I have now the following:
$wgScriptPath = "/+"; $wgArticlePath = "/$1";
with this in Apache:
Alias /= /home/pub/wiki Alias /+ /var/lib/mediawiki Alias / /var/lib/mediawiki/index.php/
and local DNS giving an IP address for hostname "wiki", and it has been working now, with URLs like:
http://wiki/Main_Page
Yes, I know this means I cannot make an article with a name beginning with "+".
Nor can you have robots.txt, favicon.ico...
On Wed, Jul 14, 2010 at 17:12, Platonides Platonides@gmail.com wrote:
Phil Howard wrote:
I have now the following:
$wgScriptPath = "/+"; $wgArticlePath = "/$1";
with this in Apache:
Alias /= /home/pub/wiki Alias /+ /var/lib/mediawiki Alias / /var/lib/mediawiki/index.php/
and local DNS giving an IP address for hostname "wiki", and it has been working now, with URLs like:
Yes, I know this means I cannot make an article with a name beginning with "+".
Nor can you have robots.txt, favicon.ico...
I can add Apache Alias or other directives as needed. Fortunately I have that level of control (and understand that not everyone does). I might go ahead and do that for favicon.ico. But as you can tell from the domain name used, this isn't going to be crawled by Googlebot, so I'm not worrying about robots.txt. OTOH, if we make a public wiki, I will (and another Alias).
mediawiki-l@lists.wikimedia.org