I'm trying to deploy a Python app via mod_wsgi in Apache httpd, running into a strange error. I'm using my firm's custom python package (2.7), besides this there is another Python intsallation, shipped with the OS (different version, 2.6 something). The issue is, when I define the WSGIPythonHome and WSGIPythonPath variables in my httpd conf, I'm flooded with "ImportError: no module named site" errors in the error_log. Looking at other answers, defining those variables would be the solution for such errors. If I switch user to the apache user, with being the PYTHONPATH and PYTHONHOME env variables set, when I try to start Python 2.7, I'm getting the same error.
After unsetting the variables, Python is able to start normally. So I've tried removing the WSGIPythonHome and WSGIPythonPath from the httpd conf, but in that case, nothing happens, the wsgi script is not executed, as nothing is pointing Apache to my python executable. The mod_wsgi.so has been installed with pip, and loaded from the same path as my PYTHONPATH would be for 2.7