[Answer]-SWIG: python module crashes only when it is deployed to Apache

0👍

Finally! After searching a lot and trying a lot, I solved this problem. Here is my conf file:

# Important! My http.conf does not contain this line. So Apache seems to 
#  load the mod_wsgi.so from somewhere else, which is unluckily not compatible 
#  with my C codes.
LoadModule wsgi_module modules/mod_wsgi.so
# Place to store file for socket communications. I created the folder manually.
WSGISocketPrefix /var/run/wsgi
<VirtualHost *:80>
  ......
  # My wsgi configuration file
  WSGIScriptAlias /basic /home/browser/BASIC/basic/basic.wsgi
  # Make the virtual host using only one Python sub interpreter.
  WSGIApplicationGroup %{GLOBAL}
  # Make it run under the daemon mode
  WSGIDaemonProcess hostname.com/basic processes=1 threads=15 display-name=%{GROUP} \
    python-path=/home/browser/BASIC/_py/lib/python2.6/site-packages
  WSGIProcessGroup hostname.com/basic
  ......
</VirtualHost>
👤Joy

1👍

Leave a comment