I've been trying to install web2py on a subdomain on my shared account at Dreamhost. There used to be some info in their knowledge base, but it has been removed for outdated. I've found lots of tutorials, but most date back at least 6 years. The website of flup is confusing - the dates of the forum seem all wrong (comments of version 0.9 are more recent that those of 1.0.3xxx).

Seemingly one of the most applicable 'recipes' installs well, but produces a 500 error. When I try to execute the web2py.fcgi, it reports Premature end of script. No obvious errors in the Apache logs.

I started Python from the virtual environment manually. import sys worked well, but from flup.server.fcgi_fork import WSGIServer caused an error which was apparently a Python 2/3 incompatibility. Installing an earlier version of flup did the trick.

Now, executing (still manually) import gluon.main produces: ImportError: No module named gluon.main. I can understand that - gluon is not in the sys.path. I can't imagine the instructions being so wrong, so it's probably something I'm doing.

  • Anyone know about a reliable install recipe for web2py on a remote shared server?

  • Or a pointer to a good description on how Apache, and web2py are supposed to communicate with each other (role of flup, `WSGI'...)

  • Is there any way to get more info for debugging?


Well, I wasn't able to get things working following this tutorial, and many tests and variations.

Finally, I found a very interesting link in the uWSGI site, which actually made things work!

The only issue left, is enabling https without self-signed certificates. I'll post another question, as it seems to be a separate matter.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.