Download httpd from httpd.apache.org
Need to prepare Xcode, autoconfig, install command tools, default XCODE5 does not provide installation
bogon:kuoxin$ xcode-select--install
bogon:kuoxin$./configure--prefix=/users/kuoxin/workspace/httpd
Note that there are no spaces in the--PREFIX=/USERS/KUOXIN/WORKSPACE/HTTPD
You may encounter the following issue 1:
Configure
Checking for Apr-util ... Yes
Checking for gcc .../applications/xcode.app/contents/developer/toolchains/osx10.9.xctoolchain/usr/bin/cc
Checking whether the C compiler works ... no
Configure:error:in '/users/kuoxin/workspace/httpd-2.4.7 ':
Configure:error:c compiler cannot create executables
Workaround:
bogon:kuoxin$ cd/applications/xcode.app/contents/developer/toolchains/
bogon:kuoxin$ sudo ln-s xcodedefault.xctoolchain osx10.9.xctoolchain
Question 2:
Checking for pcre-config ... false
Configure:error:pcre-config for Libpcre not found. PCRE is required and available from http://pcre.org/
Workaround:
Brew Install Pcre
Run make
Run make Install
Note: When using apache2.4.x, there is a compatibility problem with the django1.6 currently in use (the current time is 2014-03-24), mainly reflected in:
1. CSRF will appear missing or error problems
2. Print and other log outputs are not valid
Test is normal on 2.2.6.
Install Mod_wsgi
./configure--with-apxs=/users/kuoxin/workspace/httpd/bin/apxs--with-python=/usr/local/frameworks/ Python.framework/versions/3.3/bin/python3--disable-framework
Run make
Run sudo make install
Configure Apache httpd
Need to include in http.conf:
LoadModule Wsgi_module modules/mod_wsgi.so
Wsgiscriptalias/'/users/kuoxin/workspace/django/tagweb/tagweb/wsgi.py '
If you have the following problems:
[Tue 05 19:10:51 2009] [ERROR] [Client 127.0.0.1] \
Raise Importerror, "Could not import mysite.settings '%s ' \
(Is it on Sys.path?) Does It has syntax errors?):%s "\
% (self. Settings_module, E)
Cannot load the project configuration Django_settings_module, which is required to add statements to wsgi.py
Sys.path.append ('/users/kuoxin/workspace/django ')
Sys.path.append ('/users/kuoxin/workspace/django/tagweb ')
Configure Django + WSGI on MacOS