views:

154

answers:

2

I need to run my development through nginx due to some complicated subdomain routing rules in my pylons app that wouldn't be handled otherwise.

I had been using lighttpd + paster + Flup#scgi_thread and the nice error reporting by Pylons had been working fine in that environment.

Yesterday I recompiled Python and MySQL for 64bit, and also switched to Ngix + paster + Flup#fcgi_thread for my development environment.

Everything is working great, but I miss the fancy error reports. This is what I get now, and it is a mess compared to what I got used to:

http://drp.ly/Iygeg

Valid XHTML.

And here are the pylons/nginx configs.

Pylons:

[server:main]
use = egg:Flup#fcgi_thread
host = 0.0.0.0
port = 6500

Nginx:

location / {
    #include /usr/local/nginx/conf/fastcgi.conf;
    fastcgi_param PATH_INFO $fastcgi_script_name;
    fastcgi_param REQUEST_METHOD $request_method;
    fastcgi_param QUERY_STRING $query_string;
    fastcgi_param CONTENT_TYPE $content_type;
    fastcgi_param CONTENT_LENGTH $content_length;
    fastcgi_param  SERVER_ADDR        $server_addr;
    fastcgi_param  SERVER_PORT        $server_port;
    fastcgi_param  SERVER_NAME        $server_name;
    fastcgi_param  SERVER_PROTOCOL    $server_protocol;
    fastcgi_param  REMOTE_ADDR        $remote_addr;
    fastcgi_pass_header Authorization;
    fastcgi_intercept_errors off;
    fastcgi_pass 127.0.0.1:6500;
}
A: 

It looks like you are not getting the trackback css from _debug/media/traceback.css You might want to see if you can view the actual CSS and investigate whether nginx should serve your static content directly.

It's not a matter of CSS; that screenshot shows an error page produced by the Python standard library's cgitb module rather than the one produced by WebError.
Marius Gedminas
+1  A: 

I would guess that you need to configure Flup to disable its own error handling, so that the nice one one used by Paster could pass through.

Marius Gedminas