best apache system setup

Skip to first unread message

Adam P

May 28, 2021, 5:12:45 PMMay 28
to modwsgi
I want to run a django app and be able to choose the python version, however I am on a shared work system on which the general structure of the server should not change too much, i.e. I can sudo but I don't want to install random stuff to system. 

It seems that there are a couple of options. The first thing I thought was to use conda virtual environments, because then I can also select the python version, however it seems that anaconda python does not operate well with apache/mod-wsgi, so I dropped it after running into some issues.

Then I tried pyenv, and ran into some issues getting the virtual host to use the correct python version.

So I am wondering if I should persist with pyenv or use containers, I'm not sure the relative pros and cons of these two options (or other options if they exist).

Graham Dumpleton

May 28, 2021, 9:12:17 PMMay 28
Avoid relying on being able to modify system Apache installation. Use mod_wsgi-express installed against a specific Python version instead. If you must rely on main system Apache accepting port 80/443, then set it up as a proxy to send requests through to the "mod_wsgi-express start-server" instance.


for more information about mod_wsgi-express.

You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Arlo Shaver

Jul 6, 2021, 9:56:48 PMJul 6
to modwsgi
I found this a bit confusing.

This link  does not have "proxy" anywhere on the page.
I had seen that video earlier also and took note that "add changes to apache" as I made a mark for it

Being somewhat new to mod_wsgi and needing to perform a Centos/Django build it can be quite frustrating chasing down direct configuration methods.

I start down a path and in the middle I get placed on a different config explanation that derails me. Along with doubt as I keep finding mixed information between sources.
Currently best I can tell is take notes on every aspect as you go and mark the ones you actually need to use; then go back and hopefully piece it together.

I believe in general, most people would use httpd/apache as installed by sys admins managing the ssl and it providing other services. 
I find a lot more resources on installing mod_wsgi than using the pip install method.
I am trying to follow the pip install method as a best process but it lacks concise information. Now I see I should be using Apache as a proxy and not loading wsgi  :/
Also I would think most people using this are using Django. But that is just my reasons. 

If there is a hidden update document that forks on configuration than what I have found perhaps? 
As eventually I will need to provide results in getting this to production and may need to find alternatives. 

Is the PIP install method a production method?  

Graham Dumpleton

Jul 6, 2021, 10:03:33 PMJul 6
How to configure Apache or nginx as a proxy is covered in their respective documentation.

For some more specific notes around using a proxy in front of mod_wsgi-express see:

Ignore that it talks about proxying to it running in a docker container, the information is still relevant.

Also perhaps see:


Arlo Shaver

Jul 6, 2021, 10:14:44 PMJul 6
to modwsgi
Hi Graham, I've seen your name lots lately.

I noticed this also  #27925 (Document how to deploy using pip installed mod_wsgi) – Django (
Perhaps a good method to get solid process in the Django docs.

I'll follow up on those links you listed.

Thank you!

Adam P

Jul 8, 2021, 5:25:20 PMJul 8
For what it's worth, I had similar problems, getting half way through many tutorials before realising one or another seemingly minor point made it not practical in the end for my particular case.

I also read all of those docs and watched the videos and ended up with a lot of unknowns, to be honest I took a break from trying to get it working. Hope you have more luck and please post your final setup if you do! 

You received this message because you are subscribed to a topic in the Google Groups "modwsgi" group.
To unsubscribe from this topic, visit
To unsubscribe from this group and all its topics, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages