gpt4 book ai didi

python - Pylons 漂亮的错误处理哪里去了?使用 Nginx + Paster + Flup#fcgi_thread

转载 作者:行者123 更新时间:2023-12-01 06:17:18 25 4
gpt4 key购买 nike

由于我的 pylons 应用程序中存在一些复杂的子域路由规则,我需要通过 nginx 运行我的开发,否则无法处理。

我一直在使用lighttpd + Paster + Flup#scgi_thread,并且 Pylons 的错误报告在该环境中运行良好。

昨天我重新编译了 64 位的 Python 和 MySQL,并且还切换到了 Ngix + Paster + Flup#fcgi_thread 作为我的开发环境。

一切都运行良好,但我怀念那些花哨的错误报告。这就是我现在得到的,与我习惯的相比,这是一团糟:

http://drp.ly/Iygeg

Valid XHTML http://drp.ly/Iygeg .

这是 pylons/nginx 配置。

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;
}

最佳答案

我猜你需要配置 Flup 来禁用它自己的错误处理,以便 Paster 使用的好错误可以通过。

关于python - Pylons 漂亮的错误处理哪里去了?使用 Nginx + Paster + Flup#fcgi_thread,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2549611/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com