Search code examples
mod-wsgiredhatpython-3.6apache2.2

Apache 2.2/Redhat 2.6 with mod_wsgi


I'm having trouble configuring mod_wsgi with my current set up.

Redhat 2.6.32

Installations setup as non-root user:

  • Apache 2.2 (attempted to get 2.4, but without access to yum the dependencies were too much)
  • Python 3.6

I seem to have successfully installed mod_wsgi into /apache/modules.

Problems:

  • The apache directory structure is not what most tutorials indicate, its
    DocumentRoot is in /apache/htdocs, not /var/www/ or /sites-enabled/ or /sites/available/
  • I tried putting:LoadModule wsgi_module modules/mod_wsgi.so in httpd.conf but I am returned: $HOME/apache/modules/mod_wsgi.so into server: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory

Can anyone explain how I can use mod_wsgi with my current setup?


Solution

  • Your libpython3.6m.so.1.0 is not in any of apache's library paths.

    You can symlink it to one of the lib directories in apache's library path, or you can add the directory where your libpython3.6m.so.1.0 resides to apache's library path.

    Check this question out for help with apache paths: https://serverfault.com/questions/151328/setting-apache2-path-environment-variable