[Moin-user] Help with script alias in shared hosting

Matthew Nuzum newz at bearfruit.org
Wed Sep 20 10:00:01 EDT 2006


On 9/19/06, Todd Nine <todd.nine at gmail.com> wrote:
> I have moin moin working in a shared hosting environment with the
> following.
>
> www/wiki/ (html docs)
> www/cgi-bin/moin.cgi
>  moin-1_5_4/share/wiki
>
> I can get to my site by using "wiki.foo.com/cgi-bin/moin.cgi" and everything
> is served correctly.
>
> I want to use Alias and ScriptAlias to point the cgi alias as the root "/",
> and "/wiki/" to the html docs in moin-1_5_4.  I only have access to the
> .htaccess file, can anyone sugest a way to do this?
>

Todd,

According to http://httpd.apache.org/docs/2.0/mod/mod_alias.html#scriptalias
ScriptAlias isn't supported in .htaccess files.

I logged into my cpanel on bluehost and confirmed that there's no 100%
satisfactory solution.

I can think of two ways to make it work nicer... one is to create a
new handler and rename your cgi file to something more friendly
looking. Maybe do something like this (haven't tried it yet though)
in Cpanel go to Apache Hanlders under the "Web Server Config" section
extension = .wiki
handler = cgi-script

Rename moin.cgi to moin.wiki and put it in your root folder. Then you
may be able to access your wiki as http://foo.com/moin.wiki/FrontPage

Get creative and you could boost your search engine ranking:
foo.com/XYZ.wiki/FrontPage (where XYZ is something you want to
optimize for)

Second option is to use rewrite rules, which I believe *are* allowed.
Here's something I use that you can experiment with: (I've modified to
make it hopefully more useful to you)
  RewriteEngine on
  RewriteRule !(htdocs|images|robots.txt|favicon.ico|cgi-bin)
/cgi-bin/moin.cgi
  RewriteOptions inherit

-- 
Matthew Nuzum
www.bearfruit.org
newz2000 on freenode




More information about the Moin-user mailing list