[Moin-user] SCRIPT_NAME environment variable

Radomir Dopieralski moinmoin at sheep.art.pl
Sat Jan 23 09:27:35 EST 2010


On Sat, Jan 23, 2010 at 1:55 PM, Alexander Brüning <kshade at lamamail.de> wrote:
> Hi,
>
> I'm running MoinMoin 1.9 in Lighttpd via fcgi at /wiki-engine and use
> redirects to make it look like it's running at /.  Basically the same
> setup as here:
> http://moinmaster.wikiwikiweb.de/HelpOnInstalling/FastCgi#Deploying_on_lighttpd
>
> The update from 1.8 to 1.9 brought a new fcgi handler with it that
> doesn't seem to have an equivalent of the
>
> properties = {'script_name': '/'}
>
> variable. I tried to set SCRIPT_NAME via lighttpd but it doesn't work so
> I hacked MoinMoin/support/werkzeug/wrappers.py to always set script_root
> to /:
>
> + path = ('/').rstrip('/')
> - path = (self.environ.get('SCRIPT_NAME') or '').rstrip('/')
> (line 339)
>
> There has to be a better way to do this, right?

Yes, moinmoin now uses werkzeug, so you can use this:

http://werkzeug.pocoo.org/documentation/dev/contrib/fixers.html#werkzeug.contrib.fixers.LighttpdCGIRootFix

-- 
Radomir Dopieralski, http://sheep.art.pl




More information about the Moin-user mailing list