I've just moved from Redhat to Ubuntu. I'm now using Apache2. I got wiki to where it was working without any rewriting and using url's of the form
http://www.mercuryspacecraft.com/wiki/index.php/Main_Page
I had it installed in the wiki subdirectory of the virtual hosts document root
I then tried to once again "prettify" the urls, and to separate w from wiki as described in http://meta.wikimedia.org/wiki/Eliminating_index.php_from_the_url Using the Alias statements instead of rewrite rules
Now I can't make it work. I'm confused as to where I want to name the physical install path, should it be w or wiki. Since the Aliases seem to be going from /wiki... to /installpath/w... I think that it should be in /var/www/w which is where I've put it.
THe only thing which semi works is if I use a url like http://www.mercuryspacecraft.com/index.php/Main_Page
but thats broken, it looks like it isn't getting the style sheets. The Apache error log contains: [Wed Jul 13 15:04:07 2005] [error] [client 166.82.49.174] File does not exist: /var/www/wiki, referer: http://www.mercuryspacecraft.com/w/index.php/Main_Page
Here's what I have in my Virtual server:
<VirtualHost *> ServerAdmin webmaster@mercuryspacecraft.com ServerName www.mercuryspacecraft.com DocumentRoot /var/www AcceptPathInfo on
Alias /wiki/stylesheets /var/www/w/stylesheets Alias /wiki/style /var/www/w/style Alias /wiki/images /var/www/w/images Alias /wiki/skins /var/www/w/skins Alias /wiki/redirect.php /var/www/w/redirect.php Alias /wiki/textvc.php /var/www/w/textvc.php Alias /wiki/index.php /var/www/w/index.php Alias /wiki /var/www/w
</VirtualHost>
And the relevant parts of my LocalSettings.php
$wgScriptPath = "/wiki"; $wgScript = "$wgScriptPath/index.php"; $wgRedirectScript = "$wgScriptPath/redirect.php";
$wgArticlePath = "$wgScript?title=$1";
Any ideas?
This is what I have and it works fine The Wiki is in the directory D:/htdocs/wikiav/w/
Virtual host settings: Alias /wiki/skins D:/htdocs/wikiav/w/skins Alias /wiki D:/htdocs/wikiav/w/index.php
Local host settings: $IP = "D:/htdocs/wikiav/w"; $wgScriptPath = "/w"; $wgScript = "$wgScriptPath/index.php"; $wgRedirectScript = "$wgScriptPath/redirect.php"; $wgArticlePath = "/wiki/$1"; $wgStylePath = "$wgScriptPath/skins"; $wgStyleDirectory = "$IP/skins";
I originally had trouble with the ScriptPath setting but when I got that (trial and error) it all worked fine
Arthur Guy
arthur@astarsolutions.co.uk www.astarsolutions.co.uk
-------------------------------------------------- For immediate online Audio and Video advice why not checkout WikiAV, our Audio & Video Wiki Guide www.wikiav.com
-----Original Message----- From: mediawiki-l-bounces@Wikimedia.org [mailto:mediawiki-l-bounces@Wikimedia.org] On Behalf Of Rick DeNatale Sent: 13 July 2005 20:20 To: MediaWiki announcements and site admin list Subject: [Mediawiki-l] I just don't get the apache setup
I've just moved from Redhat to Ubuntu. I'm now using Apache2. I got wiki to where it was working without any rewriting and using url's of the form
http://www.mercuryspacecraft.com/wiki/index.php/Main_Page
I had it installed in the wiki subdirectory of the virtual hosts document root
I then tried to once again "prettify" the urls, and to separate w from wiki as described in http://meta.wikimedia.org/wiki/Eliminating_index.php_from_the_url Using the Alias statements instead of rewrite rules
Now I can't make it work. I'm confused as to where I want to name the physical install path, should it be w or wiki. Since the Aliases seem to be going from /wiki... to /installpath/w... I think that it should be in /var/www/w which is where I've put it.
THe only thing which semi works is if I use a url like http://www.mercuryspacecraft.com/index.php/Main_Page
but thats broken, it looks like it isn't getting the style sheets. The Apache error log contains: [Wed Jul 13 15:04:07 2005] [error] [client 166.82.49.174] File does not exist: /var/www/wiki, referer: http://www.mercuryspacecraft.com/w/index.php/Main_Page
Here's what I have in my Virtual server:
<VirtualHost *> ServerAdmin webmaster@mercuryspacecraft.com ServerName www.mercuryspacecraft.com DocumentRoot /var/www AcceptPathInfo on
Alias /wiki/stylesheets /var/www/w/stylesheets Alias /wiki/style /var/www/w/style Alias /wiki/images /var/www/w/images Alias /wiki/skins /var/www/w/skins Alias /wiki/redirect.php /var/www/w/redirect.php Alias /wiki/textvc.php /var/www/w/textvc.php Alias /wiki/index.php /var/www/w/index.php Alias /wiki /var/www/w
</VirtualHost>
And the relevant parts of my LocalSettings.php
$wgScriptPath = "/wiki"; $wgScript = "$wgScriptPath/index.php"; $wgRedirectScript = "$wgScriptPath/redirect.php";
$wgArticlePath = "$wgScript?title=$1";
Any ideas? _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
'a star solutions' disclaimer The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. We believe that this communication is free from viruses and other potentially dangerous programmes, but the recipient opens this communication at their own risk. We assume no responsibility for any loss or damage arising from the receipt or use of this communication
Rick DeNatale wrote:
<VirtualHost *> ServerAdmin webmaster@mercuryspacecraft.com ServerName www.mercuryspacecraft.com DocumentRoot /var/www AcceptPathInfo on
Alias /wiki/stylesheets /var/www/w/stylesheets Alias /wiki/style /var/www/w/style Alias /wiki/images /var/www/w/images Alias /wiki/skins /var/www/w/skins Alias /wiki/redirect.php /var/www/w/redirect.php Alias /wiki/textvc.php /var/www/w/textvc.php Alias /wiki/index.php /var/www/w/index.php Alias /wiki /var/www/w
</VirtualHost>
This all seems kind of redundant... take out all the aliases and rename the directory from "w" to "wiki".
What are you trying to accomplish with this setup?
-- brion vibber (brion @ pobox.com)
Quoting Brion Vibber, from the post of Wed, 13 Jul:
Rick DeNatale wrote:
<VirtualHost *> ServerAdmin webmaster@mercuryspacecraft.com ServerName www.mercuryspacecraft.com DocumentRoot /var/www AcceptPathInfo on
Alias /wiki/stylesheets /var/www/w/stylesheets Alias /wiki/style /var/www/w/style Alias /wiki/images /var/www/w/images Alias /wiki/skins /var/www/w/skins Alias /wiki/redirect.php /var/www/w/redirect.php Alias /wiki/textvc.php /var/www/w/textvc.php Alias /wiki/index.php /var/www/w/index.php Alias /wiki /var/www/w
</VirtualHost>
This all seems kind of redundant... take out all the aliases and rename the directory from "w" to "wiki".
Not at all. It's actually a very nice way to "clean" the URL without using the slow and problematic rewrite module. note the last Alias command that does the trick.
the only drawback is that the wiki pages namespace will have to be under /wiki and not directly at the root (breaks the Alias mechanism I think, needs to be figured out)
Ira Abramov wrote:
Quoting Brion Vibber, from the post of Wed, 13 Jul:
Rick DeNatale wrote:
<VirtualHost *> ServerAdmin webmaster@mercuryspacecraft.com ServerName www.mercuryspacecraft.com DocumentRoot /var/www AcceptPathInfo on
Alias /wiki/stylesheets /var/www/w/stylesheets Alias /wiki/style /var/www/w/style Alias /wiki/images /var/www/w/images Alias /wiki/skins /var/www/w/skins Alias /wiki/redirect.php /var/www/w/redirect.php Alias /wiki/textvc.php /var/www/w/textvc.php Alias /wiki/index.php /var/www/w/index.php Alias /wiki /var/www/w
</VirtualHost>
This all seems kind of redundant... take out all the aliases and rename the directory from "w" to "wiki".
Not at all. It's actually a very nice way to "clean" the URL without using the slow and problematic rewrite module. note the last Alias command that does the trick.
I don't see how. It looks like it's exactly the same as putting things in /var/www/wiki... several individual files are aliased from one directory to the other, then the whole directory is too.
Are you thinking of a different possible configuration in which a /wiki directory is aliased to the index.php?
the only drawback is that the wiki pages namespace will have to be under /wiki and not directly at the root (breaks the Alias mechanism I think, needs to be figured out)
With Rick's given configuration, wiki pages are under /wiki/index.php/Title.
Note: you should NEVER put wiki pages directly at the document root (/Title) as this wipes out your entire URL namespace. In order to have real files accessible on that host you then have to remove chunks of title namespace with exceptions, creating holes and potential conflicts. Don't do it, ever.
-- brion vibber (brion @ pobox.com)
On 7/13/05, Ira Abramov lists-MediaWiki-l@ira.abramov.org wrote:
Quoting Brion Vibber, from the post of Wed, 13 Jul:
Rick DeNatale wrote:
<VirtualHost *> ServerAdmin webmaster@mercuryspacecraft.com ServerName www.mercuryspacecraft.com DocumentRoot /var/www AcceptPathInfo on
Alias /wiki/stylesheets /var/www/w/stylesheets Alias /wiki/style /var/www/w/style Alias /wiki/images /var/www/w/images Alias /wiki/skins /var/www/w/skins Alias /wiki/redirect.php /var/www/w/redirect.php Alias /wiki/textvc.php /var/www/w/textvc.php Alias /wiki/index.php /var/www/w/index.php Alias /wiki /var/www/w
</VirtualHost>
This all seems kind of redundant... take out all the aliases and rename the directory from "w" to "wiki".
Not at all. It's actually a very nice way to "clean" the URL without using the slow and problematic rewrite module. note the last Alias command that does the trick.
the only drawback is that the wiki pages namespace will have to be under /wiki and not directly at the root (breaks the Alias mechanism I think, needs to be figured out)
I'm still not there. First of all for this scheme to work. the files physically need to live in DocumentRoot/w rather than DocumentRoot/wiki because, as I understand it Alias u p means that the url u/x should return the file p/x
Am I right in this understanding?
It looks like the Alias and AliasMatch directives are just not being processed, this is on Debian (Ubuntu 5.04) using Apache2. I put a virtual host directive for the hostname in a file in the /etc/apache2/sites-available directory and used a2ensite to enable it. I even put a bad directive in the file temporarily to prove to myself that it was geing read on startup.
On 7/13/05, Brion Vibber brion@pobox.com wrote:
Rick DeNatale wrote:
<VirtualHost *> ServerAdmin webmaster@mercuryspacecraft.com ServerName www.mercuryspacecraft.com DocumentRoot /var/www AcceptPathInfo on
Alias /wiki/stylesheets /var/www/w/stylesheets Alias /wiki/style /var/www/w/style Alias /wiki/images /var/www/w/images Alias /wiki/skins /var/www/w/skins Alias /wiki/redirect.php /var/www/w/redirect.php Alias /wiki/textvc.php /var/www/w/textvc.php Alias /wiki/index.php /var/www/w/index.php Alias /wiki /var/www/w
</VirtualHost>
This all seems kind of redundant... take out all the aliases and rename the directory from "w" to "wiki".
The setup came from the referenced article in meta
What I'm trying to accomplish is to separate the article url's from the script urls, so that I can keep googlebots and the like from going where I don't want them to go via robots.txt.
Quoting the meta article:
"This method will put articles under www.mysite.com/wiki/articlename, and everything else under www.mysite.com/w/index.php?whatever, just like the WikiMedia sites."
Rick DeNatale wrote:
The setup came from the referenced article in meta
What I'm trying to accomplish is to separate the article url's from the script urls, so that I can keep googlebots and the like from going where I don't want them to go via robots.txt.
Quoting the meta article:
"This method will put articles under www.mysite.com/wiki/articlename, and everything else under www.mysite.com/w/index.php?whatever, just like the WikiMedia sites."
Well, that configuration won't do what you want. :) Try:
apache: Alias /wiki /var/www/w/index.php
LocalSettings.php: $wgScriptPath = "/w"; $wgArticlePath = "/wiki/$1"; # let the other defaults follow based on $wgScriptPath
-- brion vibber (brion @ pobox.com)
Brion,
I tried that, and I lost my stylesheets. I think that it's because all of the variables that got set in DefaultSettings.php based on what IT set $wgScriptPath to (i.e. /wiki)
On 7/13/05, Brion Vibber brion@pobox.com wrote:
Rick DeNatale wrote:
The setup came from the referenced article in meta
What I'm trying to accomplish is to separate the article url's from the script urls, so that I can keep googlebots and the like from going where I don't want them to go via robots.txt.
Quoting the meta article:
"This method will put articles under www.mysite.com/wiki/articlename, and everything else under www.mysite.com/w/index.php?whatever, just like the WikiMedia sites."
Well, that configuration won't do what you want. :) Try:
apache: Alias /wiki /var/www/w/index.php
LocalSettings.php: $wgScriptPath = "/w"; $wgArticlePath = "/wiki/$1"; # let the other defaults follow based on $wgScriptPath
-- brion vibber (brion @ pobox.com)
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
On 7/13/05, Rick DeNatale rick.denatale@gmail.com wrote:
Brion,
I tried that, and I lost my stylesheets. I think that it's because all of the variables that got set in DefaultSettings.php based on what IT set $wgScriptPath to (i.e. /wiki)
Here's what I now have in my LocalSettings.php and it seems to work with Brion's Alias directive (which I needed to put outside of the VirtualHost directive
$wgArticlePath = "/wiki/$1"; $wgScriptPath = "/w";
#The following are copied from includes/DefaultSettings.php because # they depend on $wgScriptPath which has just been changed from "/wiki" # to "/w"
$wgScript = "{$wgScriptPath}/index.php"; $wgRedirectScript = "{$wgScriptPath}/redirect.php"; $wgStylePath = "{$wgScriptPath}/skins"; $wgStyleSheetPath = &$wgStylePath;
# I had these set to images from before, did it change in DefaultSettings # before from images to upload?
$wgUploadPath = "{$wgScriptPath}/images"; $wgUploadDirectory = "$IP/images";
mediawiki-l@lists.wikimedia.org