开发者

Change location of sys.stderr for wsgi and apache?

I am logging Apache2 errors in a custom location (i.e. not /var/log/apache2/error.log) using the following line in httpd.conf:

ErrorLog /custom/path/to/error.log

However, when I use mod_wsgi to serve a django application, the stderr output from that still gets dumped to /var/log/apache2/error.log.

My apache2 errors开发者_如何转开发 get dumped in the custom location, but my python errors still get dumped in the default location. How do I get everything to dump in the custom location?


To get what you want you need to be using mod_wsgi daemon mode. Plus, the WSGIDaemonProcess/WSGIProcessGroup directives need to be specified within the VirtualHost where you have specified the ErrorLog directive. Finally you need to be using mod_wsgi 3.0+ and not the now quite old mod_wsgi 2.0+ that some Linux distributions still provide.

Satisfy those conditions and you still can't get it going then post the problem to the mod_wsgi mailing list.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜