Is it possible to install an app running on lighttpd instead of Apache? For instance, the official web2py install script with default settings and the built-in demo app alone uses over 170mb of RAM. That's just running the admin page and the Welcome demo page. Well over the 80mb allotted in the default hosting plan. I had to tweak my server settings quite a bit to keep from getting my processes killed after installing it. If the official web2py script followed this guide and used lighttpd instead of Apache, server load by default would be a fraction of what it is with the current option. Is there a current way to write a script for this or could there be in the future? asked 24 Nov '11, 00:06 HittingSmoke |
Yes, there is a way to write a script to install web2py with lighttpd instead of Apache. The existing unofficial WebFaction web2py installer uses the WebFaction control panel API to create the application. You can use that script as a starting point and modify it to build lighttpd as a custom app (instead of installing our mod_wsgi + Apache stack), and then have it configure lighttpd to serve web2py. answered 24 Nov '11, 08:43 seanf Thanks. I'm having a bit of a problem configuring lighttpd to use web2py though. I've got lighttpd running and I've tested with with a basic HTML file, but when I try to configure it for web2py and FastCGI I get errors when starting the server:
Am I using FastCGI improperly? I've found references to /tmp/fcgi.sock in scripts on the old Webfaction forums via Google, but I can't find anything current.
(24 Nov '11, 11:14)
HittingSmoke
It sounds to me like you haven't started your web2py FastCGI handler process (which is what creates the socket file). Try doing something like this...
... then restart your lighttpd server. Also, I advise that you edit fcgihandler.py and your lighttpd configuration file to change the socket location to a file within your home directory, like "
(24 Nov '11, 12:51)
seanf
That got rid of the
(24 Nov '11, 17:18)
HittingSmoke
That's because another user on your server has ownership of
(24 Nov '11, 17:41)
seanf
Yikes, I'm an idiot. I somehow completely missed that part in your original reply, sorry. I've got the server running with web2py now. Just need to sort static files as css and images aren't rendering.
(25 Nov '11, 01:24)
HittingSmoke
|
You may build custom HTTP servers on your account like lighthttpd. You would first create a 'custom application' in the control panel following this documentation. You would than log in to the server with SSH, download the source code, build, than configure it. We do not plan on adding lighthttpd to the list of supported server installers any time soon. We provide apache since its the most stable and supported, but it is common for people to try other stacks for python like lighthttpd, nginx, passenger or gunicorn to name a few. answered 24 Nov '11, 00:33 johns |