best apache system setup

瀏覽次數:30 次
跳到第一則未讀訊息

Adam P

未讀,
2021年5月28日 下午5:12:452021/5/28
收件者: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

未讀,
2021年5月28日 晚上9:12:172021/5/28
收件者: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

未讀,
2021年7月6日 晚上9:56:482021/7/6
收件者: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

未讀,
2021年7月6日 晚上10:03:332021/7/6
收件者: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

未讀,
2021年7月6日 晚上10:14:442021/7/6
收件者: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

未讀,
2021年7月8日 下午5:25:202021/7/8
收件者: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.
回覆所有人
回覆作者
轉寄
0 則新訊息