best apache system setup

23 views
Skip to first unread message

Adam P

unread,
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

unread,
May 28, 2021, 9:12:17 PMMay 28
to mod...@googlegroups.com
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.

See:


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 modwsgi+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/19da8742-ad29-4996-93c6-5fa8e624fe72n%40googlegroups.com.

Arlo Shaver

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

This link  https://pypi.org/project/mod-wsgi/  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 https://youtu.be/CPz0s1CQsTE?t=1506

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

unread,
Jul 6, 2021, 10:03:33 PMJul 6
to mod...@googlegroups.com
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:


Graham

Arlo Shaver

unread,
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 (djangoproject.com)
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

unread,
Jul 8, 2021, 5:25:20 PMJul 8
to mod...@googlegroups.com
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 https://groups.google.com/d/topic/modwsgi/buJxHo034Bs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to modwsgi+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/5a6c5117-72ce-459f-8848-aa04017cc0dcn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages