Re: [web2py] Re: Cookbook recipe for nginx/uwsgi woes
On 29 April 2012 22:34, Bill Barry waba...@gmail.com wrote: I am running web2py on Debian with nginx and the uwsgi-plugin-python package. My configuration is similar to yours, but uses mount instead of app uwsgi pluginpython/plugin socket127.0.0.1:9001/socket mount/=/home/www-data/web2py/wsgihandler.py/mount /uwsgi Thanks. After installing the plugins this configuration is working for me. Maybe in the next edition of the Cookbook the necessity of specific plugin-handling can be mentioned for Debian. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)
Re: [web2py] Re: Cookbook recipe for nginx/uwsgi woes
I am running web2py on Debian with nginx and the uwsgi-plugin-python package. My configuration is similar to yours, but uses mount instead of app uwsgi pluginpython/plugin socket127.0.0.1:9001/socket mount/=/home/www-data/web2py/wsgihandler.py/mount /uwsgi Bill On Friday, April 27, 2012 1:16:07 AM UTC-7, rif wrote: I had the same issue and I solved by adding plugin python in the uwsgi web2py configuration: uwsgi pluginpython/plugin --HERE socket127.0.0.1:9001/socket pythonpath/home/www-data/web2py//pythonpath app mountpoint=/ scriptwsgihandler/script /app /uwsgi
Re: [web2py] Re: Cookbook recipe for nginx/uwsgi woes
If you installed uWSGI from debian/ubuntu packages you need to load the python plugin, as RIF mentioned. The uwsgi Quickstart http://projects.unbit.it/uwsgi/wiki/Quickstart says: *WARNING the following tutorials are based on the official releases, if you are using a debian-based package (that is fully modular) you will need to load the http and python plugins adding --plugins http,python to your command line.* Be sure you already installed uwsgi-plugin-python (apt-get install uwsgi-plugin-python). Good luck, -- Pedro Vasconcelos On Friday, April 27, 2012 11:06:26 AM UTC-3, Bruce Wade wrote: I have used this process to set up 3 servers now with uwsgi + nginx = http://library.linode.com/web-servers/nginx/python-uwsgi/ubuntu-10.10-maverick On Fri, Apr 27, 2012 at 1:16 AM, rif feric...@gmail.com wrote: I had the same issue and I solved by adding plugin python in the uwsgi web2py configuration: uwsgi pluginpython/plugin --HERE socket127.0.0.1:9001/socket pythonpath/home/www-data/web2py//pythonpath app mountpoint=/ scriptwsgihandler/script /app /uwsgi joi, 12 aprilie 2012, 09:23:39 UTC+3, Bruce Wade a scris: I am having the exact same problem with uwsgi 2012/04/12 06:16:49 [error] 9428#0: *1 upstream prematurely closed connection while reading response header from upstream, client: 108.172.101.4, server: 50.18.67.206, request: GET / HTTP/1.1, upstream: uwsgi://127.0.0.1:9001, host: 50.18.67.206 I tested and I can get to my static files using nginx without a problem so I know that isn't the issue. Thinking maybe sticking with apache is a better more stable solution? On Wed, Apr 11, 2012 at 2:05 PM, Michele Comitini *michele.comit...@gmail.com * wrote: To handle static request using alias instead of root with regexp should work better set $web2pyroot put the dir where you installed web2py location ~ ^/(.*)/static/(.*) { alias $web2pyroot/applications/$1/**static/$2; } mic Il 11 aprile 2012 18:23, pbreit * pbreitenb...@gmail.com** ha scritto: Looks like it is having trouble with a file in /static. This is how I serve /static: location /static { root /opt/web2py/applications/**myapp/; } You may just need to add the appname to: root /home/www-data/web2py/**applications/ Also, I don't know if you need that extra stuff on the location line. -- -- Regards, Bruce Wade http://ca.linkedin.com/in/**brucelwadehttp://ca.linkedin.com/in/brucelwade http://www.wadecybertech.com http://www.fittraineronline.**com http://www.fittraineronline.com - Fitness Personal Trainers Online http://www.warplydesigned.com -- -- Regards, Bruce Wade http://ca.linkedin.com/in/brucelwade http://www.wadecybertech.com http://www.fittraineronline.com - Fitness Personal Trainers Online http://www.warplydesigned.com
Re: [web2py] Re: Cookbook recipe for nginx/uwsgi woes
I had the same issue and I solved by adding plugin python in the uwsgi web2py configuration: uwsgi pluginpython/plugin --HERE socket127.0.0.1:9001/socket pythonpath/home/www-data/web2py//pythonpath app mountpoint=/ scriptwsgihandler/script /app /uwsgi joi, 12 aprilie 2012, 09:23:39 UTC+3, Bruce Wade a scris: I am having the exact same problem with uwsgi 2012/04/12 06:16:49 [error] 9428#0: *1 upstream prematurely closed connection while reading response header from upstream, client: 108.172.101.4, server: 50.18.67.206, request: GET / HTTP/1.1, upstream: uwsgi://127.0.0.1:9001, host: 50.18.67.206 I tested and I can get to my static files using nginx without a problem so I know that isn't the issue. Thinking maybe sticking with apache is a better more stable solution? On Wed, Apr 11, 2012 at 2:05 PM, Michele Comitini *michele.comit...@gmail.com * wrote: To handle static request using alias instead of root with regexp should work better set $web2pyroot put the dir where you installed web2py location ~ ^/(.*)/static/(.*) { alias $web2pyroot/applications/$1/static/$2; } mic Il 11 aprile 2012 18:23, pbreit * pbreitenb...@gmail.com** ha scritto: Looks like it is having trouble with a file in /static. This is how I serve /static: location /static { root /opt/web2py/applications/myapp/; } You may just need to add the appname to: root /home/www-data/web2py/applications/ Also, I don't know if you need that extra stuff on the location line. -- -- Regards, Bruce Wade http://ca.linkedin.com/in/brucelwade http://www.wadecybertech.com http://www.fittraineronline.com - Fitness Personal Trainers Online http://www.warplydesigned.com
Re: [web2py] Re: Cookbook recipe for nginx/uwsgi woes
I have used this process to set up 3 servers now with uwsgi + nginx = http://library.linode.com/web-servers/nginx/python-uwsgi/ubuntu-10.10-maverick On Fri, Apr 27, 2012 at 1:16 AM, rif feric...@gmail.com wrote: I had the same issue and I solved by adding plugin python in the uwsgi web2py configuration: uwsgi pluginpython/plugin --HERE socket127.0.0.1:9001/socket pythonpath/home/www-data/web2py//pythonpath app mountpoint=/ scriptwsgihandler/script /app /uwsgi joi, 12 aprilie 2012, 09:23:39 UTC+3, Bruce Wade a scris: I am having the exact same problem with uwsgi 2012/04/12 06:16:49 [error] 9428#0: *1 upstream prematurely closed connection while reading response header from upstream, client: 108.172.101.4, server: 50.18.67.206, request: GET / HTTP/1.1, upstream: uwsgi://127.0.0.1:9001, host: 50.18.67.206 I tested and I can get to my static files using nginx without a problem so I know that isn't the issue. Thinking maybe sticking with apache is a better more stable solution? On Wed, Apr 11, 2012 at 2:05 PM, Michele Comitini *michele.comit...@gmail.com * wrote: To handle static request using alias instead of root with regexp should work better set $web2pyroot put the dir where you installed web2py location ~ ^/(.*)/static/(.*) { alias $web2pyroot/applications/$1/**static/$2; } mic Il 11 aprile 2012 18:23, pbreit * pbreitenb...@gmail.com** ha scritto: Looks like it is having trouble with a file in /static. This is how I serve /static: location /static { root /opt/web2py/applications/**myapp/; } You may just need to add the appname to: root /home/www-data/web2py/**applications/ Also, I don't know if you need that extra stuff on the location line. -- -- Regards, Bruce Wade http://ca.linkedin.com/in/**brucelwadehttp://ca.linkedin.com/in/brucelwade http://www.wadecybertech.com http://www.fittraineronline.**com http://www.fittraineronline.com - Fitness Personal Trainers Online http://www.warplydesigned.com -- -- Regards, Bruce Wade http://ca.linkedin.com/in/brucelwade http://www.wadecybertech.com http://www.fittraineronline.com - Fitness Personal Trainers Online http://www.warplydesigned.com
Re: [web2py] Re: Cookbook recipe for nginx/uwsgi woes
I am having the exact same problem with uwsgi 2012/04/12 06:16:49 [error] 9428#0: *1 upstream prematurely closed connection while reading response header from upstream, client: 108.172.101.4, server: 50.18.67.206, request: GET / HTTP/1.1, upstream: uwsgi://127.0.0.1:9001, host: 50.18.67.206 I tested and I can get to my static files using nginx without a problem so I know that isn't the issue. Thinking maybe sticking with apache is a better more stable solution? On Wed, Apr 11, 2012 at 2:05 PM, Michele Comitini michele.comit...@gmail.com wrote: To handle static request using alias instead of root with regexp should work better set $web2pyroot put the dir where you installed web2py location ~ ^/(.*)/static/(.*) { alias $web2pyroot/applications/$1/static/$2; } mic Il 11 aprile 2012 18:23, pbreit pbreitenb...@gmail.com ha scritto: Looks like it is having trouble with a file in /static. This is how I serve /static: location /static { root /opt/web2py/applications/myapp/; } You may just need to add the appname to: root /home/www-data/web2py/applications/ Also, I don't know if you need that extra stuff on the location line. -- -- Regards, Bruce Wade http://ca.linkedin.com/in/brucelwade http://www.wadecybertech.com http://www.fittraineronline.com - Fitness Personal Trainers Online http://www.warplydesigned.com
Re: [web2py] Re: Cookbook recipe for nginx/uwsgi woes
To handle static request using alias instead of root with regexp should work better set $web2pyroot put the dir where you installed web2py location ~ ^/(.*)/static/(.*) { alias $web2pyroot/applications/$1/static/$2; } mic Il 11 aprile 2012 18:23, pbreit pbreitenb...@gmail.com ha scritto: Looks like it is having trouble with a file in /static. This is how I serve /static: location /static { root /opt/web2py/applications/myapp/; } You may just need to add the appname to: root /home/www-data/web2py/applications/ Also, I don't know if you need that extra stuff on the location line.