Originally taken from:
https://groups.google.com/forum/#!searchin/web2py/hostgator/web2py/HvKqgkatK1E/0mFjGUYPjLYJ
Install web2py at /home/user/web2py
Create a virtualenv of Python 2.7 at /home/user/python (The server's python binary is at /usr/bin/python2.7)
Create an .htaccess and index.fcgi file using instructions found elsewhere.
index.fcgi
#!/home/user/python/bin/python import sys, os sys.path.append('/home/user/web2py') os.chdir('/home/user/web2py') from flup.server.fcgi_fork import WSGIServer import gluon.main application=gluon.main.wsgibase # or # application=gluon.main.wsgibase_with_logging WSGIServer(application).run()
.htaccess
AddHandler fcgid-script .fcgi RewriteEngine On RewriteBase / RewriteRule ^index\.fcgi/ - [L] RewriteRule ^(.*)$ index.fcgi/$1 [L]
Comments (2)
0
paulo-sobral-11090 10 years ago
Can you help me with 2 questions, please?
1-Installing web2py means transferring web2py folders and files to a specific directory on the host?
2-How do I create a virtualenv of Python 2.7 in Hostgator?
Thanks
0
thinh-nham-11221 9 years ago
I have followed your steps. What's next ? How can i access to the application ?