I need it too
On Wednesday, July 29, 2009 6:08:23 AM UTC-3, Salubrium wrote:
>
> Phusion Passenger now supports WSGI (as a proof of concept) but it's
> actually excellent in my testing so far.
>
> Phusion has some good features so far but it does well in Virtual &
> Shared Environments for installation / performance / memory. So we are
> trying to get different python frameworks running smoothly using it.
> It can also be restarted by: touch /home/user/tmp/restart.txt or you
> can use always_restart.txt to make it restart each time it loads. All
> these make it great for shared environments.
>
> We use Virtualenv to create a virtual environment in /home/user and
> use pip to install our packages and then for passenger requires a /
> home/user/passenger_wsgi.py file that it uses to know how to load your
> application.
>
> I am stumbling a bit on getting web.py 0.32 working for Passenger.
> Here's our passenger_wsgi.py files for Django / Pylons. Could anyone
> suggest how we might get web.py to work, I have spent a lot of time
> trying to get it working but my mediocre python-fu / wsgi
> understanding is failing me.
>
> The closest I got was to put the whole example hello_world inside the
> passenger_wsgi.py file but "Hello World" was being downloaded rather
> than displayed as it was being sent to the browser as unix/directory
> rather than text/html. Thanks in advance.
>
> #Django - example#
> import sys, os
> INTERP = "/home/user/bin/python"
> if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv)
> sys.path.append("/home/user/lib/python2.4/site-packages")
> sys.path.append("/home/user/django_example")
> sys.path.append("/home/user")
> os.environ['DJANGO_SETTINGS_MODULE'] = 'django_example.settings'
> import django.core.handlers.wsgi
> application = django.core.handlers.wsgi.WSGIHandler()
>
> #Pylons - example#
> import sys, os
> sys.path.append("/home/user/pylons_example")
> os.environ['PYTHON_EGG_CACHE'] = '/home/user/eggs'
> from paste.deploy import
> loadapp
>
> def application(environ, start_response):
> environ['SCRIPT_NAME'] = environ['PATH_INFO']
> application = loadapp('config:/home/user/pylons_example/
> development.ini')
> return application(environ, start_response)
>
> #Web.py - #
>
>
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/webpy.
For more options, visit https://groups.google.com/groups/opt_out.