I followed your steps but got the following errors.

1. The .htaccess file causes this snippet of html to be returned for
all requests: <html><body>Error</body></html>
2. When I run dispatch.fcgi unmodified, it bails with "ImportError: No
module named fcgi" even though the import from gluon.contrib.gateways
is successful (I can print it, dir() it, and so on)
3. I modify dispatch.fcgi to import WSGIServer as "from
gluon.contrib.gateways.fcgi import WSGIServer" - this runs, but then I
get the following:
>>>
WARNING:root:unable to import dbhash
WSGIServer: missing FastCGI param REQUEST_METHOD required by WSGI!
WSGIServer: missing FastCGI param SERVER_NAME required by WSGI!
WSGIServer: missing FastCGI param SERVER_PORT required by WSGI!
WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI!
Status: 303 SEE OTHER
Content-Type: text/html
Location: /welcome/default/index
Content-Length: 66

You are being redirected <a href="/welcome/default/index">here</a>
<<<

I realize I can ignore the WSGIServer errors, but what about the 303
status?  Strange.  I tried google and the dreamhost wiki and forums
for answers but no luck. Thanks for your help.

-Rick

On Jan 7, 7:57 am, Timothy Farrell <tfarr...@swgen.com> wrote:
> 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 athttp://wiki.dreamhost.com/Web2pybut 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 aswww.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 
> aswww.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 - butwww.mydomain.net:8000does not. Thanks in 
> advance for any suggestions, -Rick-- Timothy 
> Farrell<tfarr...@swgen.com>Computer Guy Statewide General Insurance Agency 
> (www.swgen.com)
>
> [htaccess< 1K ]RewriteEngine On
> RewriteBase /
> RewriteRule ^dispatch\.fcgi/ - [L]
> RewriteRule ^(.*)$ dispatch.fcgi/$1 [L]
>
> [dispatch.fcgi< 1K ]#!/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()
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to