WSGIPythonPath 不起作用

编程入门 行业动态 更新时间:2024-10-27 20:26:08
本文介绍了WSGIPythonPath 不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我正在使用 mod_wsgi 在 Apache2 上部署我的 web.py 应用程序.

I am deploying my web.py application on Apache2 with mod_wsgi.

这是我的 virt_host 文件,

Here is my virt_host file,

WSGIPythonPath /home/ubuntu/plotwatt/libplotwatt:/home/ubuntu/plotwatt/pwstage/src

<VirtualHost *:20108>
ServerAdmin gslabrails.dev.plotwatt

DocumentRoot /var/www
WSGIScriptAlias / /var/www/currentcost/server.py
WSGIDaemonProcess currentcost user=ubuntu group=ubuntu processes=5 threads=3
WSGIProcessGroup currentcost
WSGIApplicationGroup %{GLOBAL}
AddType text/html .py

<Directory /var/www/currentcost/>
    Order deny,allow
    Allow from all
</Directory>

ErrorLog /var/log/apache2/currentcost_error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/currentcost_access.log combined

</VirtualHost>

我在 WSGIPythonPath 中给出了名为 redisStage 的库的路径.但是,它似乎对我不起作用.我是否进行了任何错误的配置?我不能将 WSGIPythonPath 指令放入 VitualHost 指令中.应该是什么原因?

I have given path to my lib named redisStage in WSGIPythonPath. But, it seems to be not working for me. Am i making any wrong configuration? I can't put WSGIPythonPath directive inside VitualHost directive. What must be the reason ?

推荐答案

根据 文档,在使用守护进程模式时不能使用 WSGIPythonPath.改用 WSGIDaemonProcess 指令的python-path"选项.

According to the docs, you cannot use WSGIPythonPath when using daemon mode. Use the 'python-path' option to the WSGIDaemonProcess directive instead.

这篇关于WSGIPythonPath 不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-20 00:46:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/972348.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不起作用   WSGIPythonPath

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!