Yep it'll work similar on hostgator - tried it out a few months back just to 
see if I could get it working, haven't actually deployed anything useful but 
it appears to run ok.  I recall that an appropriate version of Python & flup 
were already installed on my hostgator shared box. I did my install of 
web2py into a subfolder rather than the site root which probably made things 
harder.  Here's that I can quickly grab from my setup, sorry didn't take 
detailed notes :(


.htaccess
--------------
AddHandler fcgid-script .fcgi 
Options +FollowSymLinks  +ExecCGI 
RewriteEngine On 
RewriteBase /web2py/ 
RewriteRule ^dispatch\.fcgi/ - [L] 
RewriteRule ^(.*)$ dispatch.fcgi/$1 [L]


dispatch.fcgi
-------------------
#!/usr/bin/python2.7 
import sys 
from flup.server.fcgi_fork import WSGIServer 
import gluon.main 
application=gluon.main.wsgibase 
## or 
# application=gluon.main.wsgibase_with_logging 
WSGIServer(application).run() 

routes.py (sorry honestly don't remember if I changed this or not, think I 
had to add the /web2py/ because I put web2py in a subfolder of the site)
------------------------
#routes_in = ((r'.*:/favicon.ico', r'/examples/static/favicon.ico'),
#             (r'.*:/robots.txt', r'/examples/static/robots.txt'),
#             ((r'.*http://otherdomain.com.* (?P<any>.*)', 
r'/app/ctr\g<any>')))
routes_in = (('/web2py/(?P<a>.*)','/\g<a>'),)

# routes_out, like routes_in translates URL paths created with the web2py 
URL()
# function in the same manner that route_in translates inbound URL paths.
#

#routes_out = ((r'.*http://otherdomain.com.* /app/ctr(?P<any>.*)', 
r'\g<any>'),
#              (r'/app(?P<any>.*)', r'\g<any>'))
routes_out=(('/(?P<a>.*)','/web2py/\g<a>'),)

Reply via email to