I had the same issue and I solved by adding plugin python in the uwsgi web2py configuration:
<uwsgi> <plugin>python</plugin> <----------HERE------------ <socket>127.0.0.1:9001</socket> <pythonpath>/home/www-data/web2py/</pythonpath> <app mountpoint="/"> <script>wsgihandler</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 > >