问题描述
- mac django apache2.4
-
最近快配置这个配置疯了,在Mac下自带的apache2.4上部署一个Django工程,用的是mod_wsgi,按网上的教程,可就是一直出问题,例如403等,谁有配置过的apache配置文件呢?急救。。。。
解决方案
http://blog.csdn.net/makingmaker/article/details/28600325
解决方案二:
http://blog.csdn.net/makingmaker/article/details/28600325
http://blog.sina.com.cn/s/blog_60b45f230101khdk.html
http://www.cnblogs.com/liuqxFuture/archive/2012/10/20/2732277.html
解决方案三:
就是按照那几个教程配的,可总是出现403错误,我把自己的配置文件的关键地方贴上吧
LoadModule wsgi_module /usr/libexec/apache2/mod_wsgi.so
Alias /media/ /Library/WebServer/Documents/newsite/media/
Alias /static/ /Library/WebServer/Documents/newsite/static/
Require all granted
Require all granted
WSGIScriptAlias /newsite /Library/WebServer/Documents/newsite/newsite/wsgi.py
WSGIPythonPath /Library/WebServer/Documents/newsite
<Directory /Library/WebServer/Documents/newsite/>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
DocumentRoot "/Library/WebServer/Documents"
Options FollowSymLinks Multiviews
MultiviewsMatch Any
AllowOverride None
Require all granted
DirectoryIndex showdata.html
最后出现了403forbidden界面,error_log给出的是:[autoindex:error] [pid 804] [client ::1:51583] AH01276: Cannot serve directory /Library/WebServer/Documents/: No matching DirectoryIndex (showdata.html) found, and server-generated directory index forbidden by Options directive