[Moin-user] Re: remove moin.cgi from URL

Mariano Absatz el.baby at gmail.com
Wed Mar 29 08:42:07 EST 2006


Gisbert Amm escribió el 29/03/06 11:57:
> What kind of webserver do you use? E.g. on Apache you need a ScriptAlias 
> to do that. It's written down in the installation advices:
> 
> http://moinmoin.wikiwikiweb.de/HelpOnInstalling
> 
> Regards,
> Gisbert Amm
> 
> Mehdi Hassanpour wrote:
>  >
>  > I couldn't find any help removing cgi-bin & moin.cgi from URL ( in
>  > MoinMoin 1.5.2 )
>  >
>  > Can you please tell me what should I do ? and how should I remove
>  > chi-bin and moin.cgi from URL or hide them ?
> 
Well... I have a similar problem.

I have moin 1.5.2 running on an Apache virtual server that is chrooted
and run via "suexec" (it's an ensim server running on fedora core 1:
http://www.ensim.com/products/pro/linux/index.html)

I compiled and installed Python 2.4.2 within the chrooted virtual host,
so I'm fine with this.

Now, I installed following the directions in
http://moinmoin.wikiwikiweb.de/HelpOnInstalling/ApacheOnLinuxFtp

I have ssh access to the virtual server, but I can't edit httpd.conf...
I can only configure the webserver via .htaccess.

I have everything up and running. moin.cgi is in /var/www/cgi-bin which
is the only directory where I get to execute code.

Now I want to "hide" the "/cgi-bin/moin.cgi" string from the URL.

I do as instructed in
http://moinmoin.wikiwikiweb.de/HelpOnConfiguration/ApacheVoodoo (except
for the "RewriteLogLevel 0" which is invalid inside a .htaccess file,
anyway, that's the default value for the directive).

Now it "kinda" works... that is, http://www.example.com/mywiki gets
executed correctly and shows the exact same page as if I use
http://www.example.com/cgi-bin/moin.cgi.

However, all the links within the MainPage point to the
http://www.example.com/cgi-bin/moin.cgi/PageName URLs...

Googling a little I found
http://moinmoin.wikiwikiweb.de/SourceForge#head-2ab82643806f146559c78ed6dcfdd100800dd37f
that is handtailored for a SourceForge site, but I'm taking the ideas...

I edited moin.cgi and replaced:
request = RequestCGI()
with:
request = RequestCGI(properties={'script_name':'/mywiki'})

It just seems to work... http://www.example.com/mywiki gets the page I
want and links inside that page point to
http://www.example.com/mywiki/PageName

but clicking on any of them gets me a 500 Internal Server Error.

My Apache error_log gets me the clasical:
> Premature end of script headers: moin.cgi, referer:
>                  http://www.example.com/mywiki

I got the server administrator to hand me the apache logs from the
"mother server" (not my virtual server) and they show the following in
suexec.log:

> [2006-03-29 13:06:33]: error: target uid/gid (661/662) mismatch with
>                directory (0/0) or program (661/662)

661/662 is my userid/gid... 0/0 is obviously the appliance's root... but
I don't know to which directory it refers to...

Within my virtual server /var/www/html, /var/www/cgi-bin and all its
subdirectories are owned by me (661/662).

Any hints?

(I'm enclosing the .htaccess FYI)


-- 
Mariano Absatz - "El Baby"
el.baby at gmail.com

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Outlook: A program designed to diseminate computer
viruses. It can do e-mail too.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
* TagZilla 0.059 * http://tagzilla.mozdev.org

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: .htaccess
URL: <http://mail.python.org/pipermail/moin-user/attachments/20060329/f554f4c4/attachment.ksh>


More information about the Moin-user mailing list