Hi,
- Virtualenv can be used on production. You don't need to "activate" it, you can just execute the Python interpreter inside the virtualenv. "Virtualenv demystified" explains it in detail. With mod_wsgi you can use a virtualenv using WSGIPythonHome.
- I don't know PyCharm but it should be similar.
- You don't need Docker for that.
- Your question is not clear to me, but it is certain that both Apache and nginx can do what you want. You should not choose between them based on whether they can reverse proxy (they both can) or whether you can run several Django apps plus Wordpress on the same machine (you can with both, though Wordpress on Apache is easier). Note, however, that very often when people say "Apache" in the context of Django they frequently mean "Apache + mod_wsgi", whereas you can perfectly run Apache with Gunicorn. Also take a look at "Which components should I use in production?", which deals with many of your questions.
Regards,
Antonis
Antonis Christofides http://djangodeployment.com
On 2017-06-07 05:08, Bruce Whealton wrote:
Hello all,--There is a topic of confusion for me related to Apache and mod_wsgi.I have been using two cloud providers DigitalOcean and PythonAnywhere. The latter actually let me geta home page being served by apache and not the development server ( which actually isn't even an optionon PythonAnywhere). I could setup Django with one click and set it up with python3.4.So, my questions are as follows: 1) Virtualenv is described as so important but it seems it only can work indevelopment. I mean once the terminal session closes, the venv that I setup is no longer active?2) How do I get an IDE like Pycharm to recognize the Virtualenv? I know I can select the compiler to be inside theVirtualenv but other libraries that I installed into that virtualenv, if the virtualenv is not active, then it won't find theinstallations of the different libraries.3) I am thinking of using Docker to solve these problems but for some reason, I'd like to see how this was done without Docker.
4) I believe that nginx can work better as a reverse proxy whether using Docker or not, e.g. if I want to install WordPresson the same server or the same vps as Django/Flask, with nginx listening on port 80 the default. I'm studying nginx now,so, if apache can work as a reverse proxy, load balancer and web server, is it easier or better to use nginx for this?
Thanks so much for any help in advance,Bruce
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+unsubscribe@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/0e9b0985-ae29-49cd-8005-1be393db79f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment