1.
475 Brew Tap Homebrew/apache
476 Brew Install Mod_wsgi
477 ls/usr/local/cellar/mod_wsgi/4.5.7/libexec/mod_wsgi.so
478 sudo vi/etc/apache2/httpd.conf
2.
wsgi.py
Import Sys
Sys.path.append ('/library/webserver/documents/blog ')
setting.py
Installed_apps = [
' Django.contrib.admin ',
' Django.contrib.auth ',
' Django.contrib.contenttypes ',
' Django.contrib.sessions ',
' Django.contrib.messages ',
' Django.contrib.staticfiles ',
' Django.contrib.sites ',
' Django.contrib.flatpages ',
' Django.contrib.sitemaps ',
' Django_comments ',
' Rest_framework ',
' Corsheaders ',
' Snippets ',
' Blogpost ',
' Blog '
]
3.
httpd.conf
Wsgiscriptalias//library/webserver/documents/blog/blog/wsgi.py
Wsgipythonpath/library/webserver/documents
<Directory/Library/WebServer/Documents/blog>
<files wsgi.py>
Order Deny,allow
Allow from all
</Files>
</Directory>
alias/static//library/webserver/documents/blog/static/
<Directory/Library/WebServer/Documents/blog/static>
Allow from all
</Directory>
DocumentRoot "/library/webserver/documents"
<directory "/library/webserver/documents" >
wsgiscriptalias/blog/library/webserver/documents/blog/blog/wsgi.py
http://blog.csdn.net/cocowuyung/article/details/51045703
http://blog.csdn.net/makingmaker/article/details/28600325
The next day Django Apache