I wrote a small shell script to install web2py (latest) with nginx (1.0.11) and uwsgi (220.127.116.11). I have tested it on three different accounts and it seems to work fine. I commented out the creation of the cronjobs, because I did not need them, so this is not tested. I hope that this will be useful to you :-)
I used the information form the following sites:
When I have more time, I will write a python version that works with the xml-rpc and can be used as a install script:
How to use the script:
If you like the script, feel free to vote for it.
Here is the script:
Thank you so much for this easy solution, salomonderossi!
I ran into only one problem: I went with the arbitrary port 9001 for communications between nginx and uwsgi. I guess someone else on my shared host used the same script, so the port was already in use. Maybe someone more familiar with the setup would've known immediately what the problem was, but all I was seeing when trying to load the web2py "welcome" app was the message: invalid request
I went back and changed port 9001 to another number in the two configuration files, nginx.conf and uwsgi.xml and stopped/started them again. It works :)
Thanks again for sharing your lovely script.
answered Jan 29 '12 at 04:18
To Anwer some questions:
I hope I could help a little bit :-)
answered Jan 26 '12 at 09:15
I cant get this to work, i ran the script and it did not give any errors. I can see my application listening to the custom port, my domain names are listed under the websites. Am I supposed to start the server in ssh? Sorry, I am completely new to linux and servers.
answered Apr 13 '12 at 22:43
wget http://nginx.org/download/nginx-1.0.11.tar.gz is outdated, latest is 1.2.3
I changed to 1.2.3 in the script, but it failed at "make -f Makefile.Py26"
I changed this to just "make", but then on running uwsgi can't find python.
answered Jun 07 '12 at 01:54
I've been trying to get this running with the latest versions of nginx and uwsgi for the last couple hours. After a lot of toubleshooting I've come up with an udpated script that works. It fixes some issues with the original script and brings the config entries up to date for the newer nginx and uwsgi versions. The result is noticeably faster response time over the apache web2py script on the wiki. After I toy around with nginx and uwsgi a bit more I'll tweak it for the optimal performance within default RAM allowances.
WARNING: I AM NOT PROGRAMMER OR A SKILLED SYSADMIN. I MODIFIED THIS SCRIPT THROUGH TRIAL AND ERROR AND LOTS OF GOOGLING. REVIEW ALL COMMANDS YOURSELF BEFORE RUNNING IT AND ETC ETC!