mac django apache2.4

最近快配置这个配置疯了,在Mac下自带的apache2.4上部署一个Django工程,用的是mod_wsgi,按网上的教程,可就是一直出问题,例如403等,谁有配置过的apache配置文件呢?急救。。。。

3个回答

就是按照那几个教程配的,可总是出现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

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问