且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

添加参数到WSGI脚本别名

更新时间:2023-12-05 19:00:04

一起来,确保您使用的是守护进程模式,这是无论如何pferred $ P $。

First up, ensure you are using daemon mode, it is preferred anyway.

  • http://blog.dscpl.com.au/2012/10/why-are-you-using-embedded-mode-of.html

那么你的WSGI脚本文件里面你可以这样做:

Then inside of your WSGI script file you can do:

import mod_wsgi

process_group = mod_wsgi.process_group

您可以再使用的过程组的名称作为区分哪种配置的一种方式。

You can then use the name of the process group as a way of distinguishing which configuration.

在换句话说,使用您选择的Apache配置文件作为区别因素中使用的守护进程组的名称。

In other words, use the name of the daemon process group you choose to use in the Apache configuration file as the distinguishing factor.