Hi, I looked at previous messages and others on StackOverflow but none seem to solve my issue.
I have an app I wrote working perfectly fine under Python 3.11 with mod_wsgi and Apache 2.
I did a bunch of development on the app (upgraded django, new features), and set up a new checkout of that on my server, with its own virtual environment (using venv). It uses effectively the same config (different subdomain) in Apache2 as the original older copy, but the new one fails with an import error while the old one is still chugging along.
I double checked the instructions at https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/modwsgi/
I've also re-verified the mod_wsgi I installed (via pip) matches the Python version I'm using (both are Python 3.11).
I also tried:
- Removing the python-path argument
- The mod_wsgi docs suggest I don't need that if I specify python-home?
- Setting WSGIApplicationGroup to %{GLOBAL}
Unfortunately the error didn't change at all after trying those.I've attached the relevant apache2 config section which includes all the mod_wsgi-setup (the rest is just redirects, ssl stuff, aliases, etc.)
I also attached the error from the log. It looks like it's trying to use the system Python instead of the one that exists in my .env (virtual environment) directory.
I'm banging my head as to why this worked before but not now so any help is much appreciated. Thank you! 🙂
Other details:
- wsgi.prod.py is the default wsgi.py, just modified to load settings.prod.py
- The server is Devuan Daedalus
--
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/IJp7zr6SjtY/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/1856a102-140f-4174-a326-73d170d719bdn%40googlegroups.com.
--
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/IJp7zr6SjtY/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/7184C263-1522-4583-A98B-EC9806B0FA66%40gmail.com.
On 13 May 2024, at 2:33 PM, A McBain <mcbai...@gmail.com> wrote:The old one is running on the same physical server, just with its own Apache config and own subdomain. As to having multiple things running, that's why I set WSGIApplicationGroup to %{SERVER} but just in case I changed it explicitly to "enfilade.asmcbain.net" (no effect, but shouldn't hurt anything to keep the change).
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/CAGV_ScocfNc%3DSv7W7Ha3MbrM_0wq43v8U0AM3JOuNtsfP9vK%3Dw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/CAGV_ScoxJu%3DxKwijvbPjE78BnZZD4s2ppRBT0-jCErCgdr8v%2Bg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/CAGV_Scr3A_PxtgAtamReunLZ9zjG03OFG%2BZZFpQWV5aSzmo16Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/CAGV_ScqPGkJ2r_UKL0rQHf6RHXLvfoSWrpmVk-tfc0gqCtvb%2BA%40mail.gmail.com.