Good afternoon,
apologies if this is off the topic of this mailing list, but googling
around and browsing returned no results.
In my setup I'm using nginx + uwsgi + web.py, and while using web.py
default web server custom error pages are being server properly (i.e. 404),
then when running under nginx + uwsgi I'm only getting web.py default 404
page.
Any help or kick in the right direction will be appreciated.
My configs are as follow:
/etc/nginx/sites-enabled/webapps:
server {
listen 80;
set $webappsdir /srv/www/webapps/;
server_name *.webapps.local;
if ($host ~* ^(.*)\.webapps\.local$) {
set $appname $1;
}
location /static/ {
try_files $uri =404;
root /srv/www/webapps/$appname;
}
location / {
include /etc/nginx/uwsgi_params;
uwsgi_pass unix:///tmp/uwsgi_vhosts.sock;
uwsgi_param UWSGI_CHDIR /srv/www/webapps/$appname;
uwsgi_param UWSGI_PYHOME /srv/www/webapps/$appname;
uwsgi_param UWSGI_SCRIPT index;
}
}
/srv/www/webapps/example/index.py:
import web
urls = (
'/', 'index'
)
app = web.application(urls, globals())
class index:
def GET(self):
return "Hello, world!"
def notfound():
return web.notfound("404. Not found")
app.notfound = notfound
if __name__ == "__main__": app.run()
application = app.wsgifunc()
application.notfound = notfound
/etc/uwsgi/apps-enabled/vhosts.ini:
[uwsgi]
gid = www-data
uid = www-data
vhost = true
plugin = python
logdate
socket = /tmp/uwsgi_vhosts.sock
#socket = 127.0.0.1:3031
master = true
processes = 1
harakiri = 20
limit-as = 512
memory-report
no-orphans
Thanks in advance,
Jakub
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/webpy.
For more options, visit https://groups.google.com/groups/opt_out.