On donderdag 28 juni 2018 17:46:42 CEST Bruce Whealton wrote:

>             In all cases, a virtualenv is recommended for any Python
> deployment.  In both cases, I have Apache as the web server with mod_wsgi.
> Obviously, I need the server, Apache, to activate the
> Django environment.  I can ssh to my VPS but what good is that.  I don't
> need my username to be activating the Python isolated environment.  As soon
> as I close the ssh session the activated environment
> is no longer activated.  My best guess is that the Apache user must
> activate the virtual environment and keep it activated as an isolated
> virtual environment.

Virtualenv "activation" is not magic. It simply adjusts PATH so that the 
virtualenv's bin directory is first. This means that whenever "python" or "pip" 
is typed into the shell it will not execute `/usr/bin/python` but
`your-virtualenv/bin/python`. Handing apache a sanitized PATH with the 
virtualenv bin dir as first directory, will effectively do the same as 
"activation".

(To be complete: activate also alters your shell prompt, this has no effect in 
one-off application launches).

-- 
Melvyn Sopacua

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2410185.edddNGrWiM%40fritzbook.
For more options, visit https://groups.google.com/d/optout.

Reply via email to