Re: [Moin-user] SCRIPT_NAME environment variable
On Sat, Jan 23, 2010 at 1:55 PM, Alexander Brüning ksh...@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 -- Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev ___ Moin-user mailing list Moin-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/moin-user
Re: [Moin-user] SCRIPT_NAME environment variable
On 01/23/2010 03:27 PM, Radomir Dopieralski wrote: On Sat, Jan 23, 2010 at 1:55 PM, Alexander Brüningksh...@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 I can't import it... import MoinMoin.support.werkzeug Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python2.6/site-packages/MoinMoin/support/werkzeug/__init__.py, line 143, in module old_module = sys.modules['werkzeug'] KeyError: 'werkzeug' -- Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev ___ Moin-user mailing list Moin-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/moin-user
Re: [Moin-user] SCRIPT_NAME environment variable
I am also interested in this, though I don't use Lighttpd. I created a feature request about a week ago -- http://moinmo.in/FeatureRequests/HideScriptName. An option similar to the old properties = {'script name':'/'} in the cgi/fcgi file would be much preferred to messing around with underlying code. Best, Chris On Sat, Jan 23, 2010 at 10:16 AM, Alexander Brüning ksh...@lamamail.de wrote: On 01/23/2010 03:27 PM, Radomir Dopieralski wrote: On Sat, Jan 23, 2010 at 1:55 PM, Alexander Brüningksh...@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 I can't import it... import MoinMoin.support.werkzeug Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python2.6/site-packages/MoinMoin/support/werkzeug/__init__.py, line 143, in module old_module = sys.modules['werkzeug'] KeyError: 'werkzeug' -- Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev ___ Moin-user mailing list Moin-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/moin-user -- Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev ___ Moin-user mailing list Moin-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/moin-user