Shared Libraries
  • add entry to ls.so.conf.d or /opt/lib
  • run /sbin/ldconf -v
  • selinux chcon -t httpd_sys_script_exec_t' for all shared libraies
Python
  • download source;
  • configure with prefix=/opt --enable-shared --with-threads ;
  • make;
  • make install;
  • (/opt/bin/python is the latest version)
  • PyXml? has to be installed for Maki
  • lib-dynaload has to be httpd_sys_content_t
  • the .so have to chcon -t httpd_sys_script_exec_t (I think)
mod_WSGI
  • yum install httpd-devel
  • create a directory in /var/run/apache2 where we can connect to apache
  • ../configure --with-python=/opt/bin/python2.7
  • make
  • sudo make install
  • load module in config
LoadModule wsgi_module  modules/mod_wsgi.so

WSGIApplicationGroup %{GLOBAL}

WSGIDaemonProcess wsgi  python-path=/var/www/maki  processes=5  threads=1
WSGISocketPrefix /var/run/apache2/wsgi

WSGIScriptAlias /maki-wsgi  "/var/www/wsgi-scripts/maki.wsgi"
WSGIScriptAlias /hello      "/var/www/wsgi-scripts/test.wsgi"
WSGIScriptAlias /works      "/var/www/wsgi-scripts/works.wsgi"
WSGIScriptAlias /environ    "/var/www/wsgi-scripts/environ.wsgi"

AddHandler wsgi-script .py
Action maki /maki-wsgi

DirectoryIndex index.py index.xml

<Directory /var/www/wsgi-scripts/ >
  WSGIProcessGroup  wsgi
  Order allow,deny
  Allow from all
</Directory>

Alias /maki "/var/www/maki/sites/maki/www"
<Directory  /var/www/maki/sites/maki/www>
  DirectoryIndex index.xml
  Options All MultiViews
  AddHandler maki  .xml
</Directory>

Maki

libxml2 version 2.6.26 (RedHat 12/14/2010) libxml2-python2.6.21 (these work with the above version)