如何在 apache 默认 conf 文件中添加多个 python-path



我想在 000-default.conf apache 配置文件中为 python-path 添加多个条目。

WSGIDaemonProcess my_project python-path=/home/user/Documents/my_project python-home=/home/user/Documents/my_project/virtualenv

在上行中,python-path 变量包含我的 django 项目根目录的路径,我想指定一些其他目录路径,以便我可以从我的 django 项目应用程序文件中导入这些模块。

当指定 PYTHONPATH env 变量时,多个路径用 ":" 分隔,你可以在这里尝试相同的方法,即python-path=/some/dir:/some/other/dir.

最新更新