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: * http://blog.dscpl.com.au/2015/06/proxying-to-python-web-application.html <http://blog.dscpl.com.au/2015/06/proxying-to-python-web-application.html> * http://blog.dscpl.com.au/2015/07/redirection-problems-when-proxying-to.html <http://blog.dscpl.com.au/2015/07/redirection-problems-when-proxying-to.html> Ignore that it talks about proxying to it running in a docker container, the information is still relevant. Also perhaps see: * http://blog.dscpl.com.au/2015/04/using-modwsgi-express-with-django.html <http://blog.dscpl.com.au/2015/04/using-modwsgi-express-with-django.html> * http://blog.dscpl.com.au/2015/05/using-modwsgi-express-as-development.html <http://blog.dscpl.com.au/2008/12/using-modwsgi-when-developing-django.html> Graham > On 7 Jul 2021, at 11:55 am, Arlo Shaver <[email protected]> wrote: > > I found this a bit confusing. > > This link https://pypi.org/project/mod-wsgi/ > <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 > <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? > On Friday, May 28, 2021 at 8:12:17 PM UTC-5 Graham Dumpleton wrote: > 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: > > https://pypi.org/project/mod-wsgi/ <https://pypi.org/project/mod-wsgi/> > https://www.youtube.com/watch?v=H6Q3l11fjU0&t=2s > <https://www.youtube.com/watch?v=H6Q3l11fjU0&t=2s> > > for more information about mod_wsgi-express. > > >> On 28 May 2021, at 11:28 pm, Adam P <[email protected] >> <applewebdata://B72BE4AC-4B1E-4B23-B071-CDC7CBA4B68B>> wrote: >> > >> 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). >> > >> -- >> 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 [email protected] >> <applewebdata://B72BE4AC-4B1E-4B23-B071-CDC7CBA4B68B>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/modwsgi/19da8742-ad29-4996-93c6-5fa8e624fe72n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/modwsgi/19da8742-ad29-4996-93c6-5fa8e624fe72n%40googlegroups.com?utm_medium=email&utm_source=footer>. > > > -- > 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 [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/modwsgi/a5e74a4a-f5d7-4656-861b-a3625e1be507n%40googlegroups.com > > <https://groups.google.com/d/msgid/modwsgi/a5e74a4a-f5d7-4656-861b-a3625e1be507n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/60592607-775B-4853-9F05-189E60BECB0D%40gmail.com.
