pythonapache
my os version is 10.8.5
last revision: 2014-06-27
here are the instructions:
# download & install xampp (you only get 64-bit version for mac)
http://www.apachefriends.org/download.html # install python 2.7.x (64-bit)
http://www.python.org/download/releases/2.7.7/ # check python bit-version (run the following script in python)
import struct; print( 8 * struct.calcsize(p))
(should print out ‘64′)
# check python version (run the following script in python)
import sys; print (sys.version)
(print out ‘2.7.7′ in this moment)
# download mod_wsgi (a bride for apache and python)
http://github.com/grahamdumpleton/mod_wsgi/releases # install mod_wsgi
make distclean
./configure –with-apxs=/applications/xampp/xamppfiles/bin/apxs –with-python=/library/frameworks/python.framework/versions/2.7/bin/python
make
sudo make install
# add load wsgi module script in apache configuration (httpd.conf)
loadmodule wsgi_module modules/mod_wsgi.so
that’s all then you can launch apache & mysql in xampp now.
good luck!
[import!!] the apache bit-version must be matched with the python bit-version, or you will get error while apache trying to launch. they must be both 64-bit version or both 32-bit version.
tags:apache,mod_wsgi,mysql,python,xampp
