如何告诉systemd启动的uWSGI守护进程使用特定的python?

如何告诉systemd启动的uWSGI守护进程使用特定的python?,python,django,virtualenv,uwsgi,Python,Django,Virtualenv,Uwsgi,我从在线示例中拼凑了下面的uWSGI配置文件。 (◠﹏◠) 给定这个配置——它位于/etc/uwsgi.d/myapp.ini中,用于启动uwsgi守护进程,然后通过systemd/systemctl启动myapp——我用它来告诉它为myapp使用特定的虚拟环境PYTHON吗 这是家吗 换句话说,当它调用django.wsgi应用程序时,我如何告诉它(或者它如何知道)使用:/home/myapp\u unixHome/.virtualenvs/myapp/bin/python [uwsgi]

我从在线示例中拼凑了下面的uWSGI配置文件。 (◠﹏◠)

给定这个配置——它位于
/etc/uwsgi.d/myapp.ini
中,用于启动
uwsgi
守护进程,然后通过
systemd/systemctl
启动
myapp
——我用它来告诉它为
myapp
使用特定的虚拟环境PYTHON吗

这是家吗

换句话说,当它调用
django.wsgi
应用程序时,我如何告诉它(或者它如何知道)使用:
/home/myapp\u unixHome/.virtualenvs/myapp/bin/python

[uwsgi]

# =======================================================
# Directories ...
# =======================================================
home       =    /home/myapp_unixHome/.virtualenvs/myapp/  <--- Python virtualenv dir.
chdir      =    /home/myapp_unixHome/myapp/               <--- Django App here.
wsgi-file  =    /home/myapp_unixHome/myapp/django.wsgi    <--- Including this django.wsgi file.
static-map = /m=/home/myapp_unixHome/myapp/static/        <--- Static files.
# =======================================================

# =======================================================
# TO BE NAMED ...
# =======================================================
master = true
processes = 5
# =======================================================

# =======================================================
# myapp communicates w/ nginx via a UNIX domain socket.
# =======================================================
socket       = /run/uwsgi/myapp.sock
chmod-socket = 664
uid          = nginx
gid          = nginx
vacuum       = true
# =======================================================

# =======================================================
# uWSGI Log file.
# =======================================================
logto = /var/log/uwsgi.log
# =======================================================
[uwsgi]
# =======================================================
#目录。。。
# =======================================================
home=/home/myapp\u unixHome/.virtualenvs/myapp/是,检查此链接

我希望它有帮助

是的,请查看此链接


我希望它能有所帮助

谢谢你@gautamaggarwal。我到处找了(在文档中)但找不到。谢谢你。谢谢你@gautamaggarwal。我到处找(在文档中)但找不到。谢谢。
home            = /path/to/virtualenv