2
所以我想在Windows服務器上部署我的django項目,使用Apache 2.4與mod_wsgi和pythong 3.4。在配置httpd.conf之前,只需嘗試啓動安裝了mod-wsgi的apache,它就會起作用,並向我顯示「它有效」頁面。然後我做在httpd.conf配置如下:Apache 2.4與mod_wsgi:403 Forbidden,沒有權限訪問此服務器上的/ calbase
# Change Python path used by the server.
WSGIPythonPath 「/EquipmentCalibration」
# Make calls to http://localhost/ refer to the Python/WSGI-script located at the specified location.
WSGIScriptAlias//EquipmentCalibration/equipcal/wsgi.py
# Make calls to http://localhost/static refer to the specified folder.
Alias /static/ /EquipmentCalibration/static
Alias /media/ /EquipmentCalibration/media
<Directory /EquipmentCalibration/static>
Require all granted
</Directory>
<Directory /EquipmentCalibration/media>
Require all granted
</Directory>
<Directory /EquipmentCalibration/equipcale>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
,然後嘗試去到本地主機:8080(我改變了口80〜8080),我得到這個錯誤說:
Forbidden
您沒有權限訪問/在此服務器上。
下面是相關的error.log。
[Thu Sep 29 15:05:25.171920 2016] [mpm_winnt:notice] [pid 7756:tid 528] AH00456: Apache Lounge VC10 Server built: Jul 9 2016 11:59:00
[Thu Sep 29 15:05:25.171920 2016] [core:notice] [pid 7756:tid 528] AH00094: Command line: 'C:\\Apache24\\bin\\httpd.exe -d C:/Apache24'
[Thu Sep 29 15:05:25.171920 2016] [mpm_winnt:notice] [pid 7756:tid 528] AH00418: Parent: Created child process 7524
[Thu Sep 29 15:05:25.500078 2016] [wsgi:warn] [pid 7524:tid 456] mod_wsgi: Compiled for Python/3.4.2.
[Thu Sep 29 15:05:25.500078 2016] [wsgi:warn] [pid 7524:tid 456] mod_wsgi: Runtime using Python/3.4.3.
[Thu Sep 29 15:05:26.171978 2016] [mpm_winnt:notice] [pid 7524:tid 456] AH00354: Child: Starting 64 worker threads.
[Thu Sep 29 15:05:27.174429 2016] [mpm_winnt:notice] [pid 7636:tid 456] AH00364: Child: All worker threads have exited.
[Thu Sep 29 15:05:29.923754 2016] [authz_core:error] [pid 7524:tid 1108] [client ::1:55483] AH01630: client denied by server configuration: C:/EquipmentCalibration/equipcal/wsgi.py
請問有人請幫忙嗎? TIA。
哦,我的上帝不能相信這是一個錯字.....非常感謝!現在它有一些我可以處理的內部服務器錯誤。再次感謝 –