I have mine working like this:

1) Extract web2py to ~/web2py
2) Place the attached dispatch.fcgi in your webroot (~/www you said)
3) Modify dispatch.fcgi to point to the right directories in your situation
4) Place the attached htaccess file in your webroot.  (Make sure you rename it to .htaccess )

No need to run web2py, FastCGI takes care of it.  I've had some trouble with routes with this setup, but I'm not sure if it's me or the setup.  =)

Let me know if that doesn't work for you.  One thing to note is that you must specify python2.5 (1st line in dispatch.fcgi) because dreamhost's default `python` points to python 2.4.4

-tim

richard.ree wrote:
Anyone running web2py on dreamhost?

I folllowed the instructions at http://wiki.dreamhost.com/Web2py but
couldn't figure out how to adapt them to my case.  I have a shell
account but not a WebID so I have no access to the control panel.  In
my home directory, web content is served from ~/www, which is visible
as www.mydomain.net/myusername.  I'd like to set up web2py such that
it's accessible as, e.g., www.mydomain.net/myusername/web2py, or
better yet, have a specific web2py application visible as
www.mydomain.net/myusername/myapp.  On another server where I control
apache I used ProxyPass directives to do this.

Is it a matter of using the wsgi handler?

I can start web2py on the dreamhost server and tunnel port 8000 to my
local machine - this works - but www.mydomain.net:8000 does not.

Thanks in advance for any suggestions,
-Rick



  

-- 
Timothy Farrell <tfarr...@swgen.com>
Computer Guy
Statewide General Insurance Agency (www.swgen.com)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

RewriteEngine On
RewriteBase /
RewriteRule ^dispatch\.fcgi/ - [L]
RewriteRule ^(.*)$ dispatch.fcgi/$1 [L]
#!/usr/bin/env python2.5

import os
import sys

os.chdir('/home/<username>/web2py')

path=os.path.normpath('/home/<username>/web2py/')
if not path in sys.path: sys.path.append(path)

import gluon.main
import gluon.contrib.gateways.fcgi as fcgi
application=gluon.main.wsgibase

if __name__ == '__main__':
    from fcgi import WSGIServer
    WSGIServer(application).run()

Reply via email to