2016-09-29 2 views
2

아파치 2.4와 mod_wsgi 및 pythong 3.4를 사용하여 윈도우 서버에 내 장고 프로젝트를 배포하려고합니다. httpd.conf를 설정하고 mod-wsgi가 설치된 상태로 apache를 시작하기 전에 작동하고 "작동"페이지가 표시됩니다.아파치 2.4와 mod_wsgi : 403 금지됨,이 서버에서/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 (I 8080에 80에서 포트를 변경), 내가 말하는이 오류 가지고 :

을 그때 httpd.conf 파일에 다음과 같은 구성을했다 금지 됨

이 서버에 액세스하거나 액세스 할 수있는 권한이 없습니다.

다음은 관련 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.

답변

3

섹션 :

<Directory /EquipmentCalibration/equipcale> 
<Files wsgi.py> 
Require all granted 
</Files> 
</Directory> 

WSGIScriptAlias 지시어에 사용되는 것과 일치 않는 디렉토리 이름이 있습니다. 하나는 equipcal이고 다른 하나는 equipcale입니다. 세그먼트 이름을 일치시켜야합니다.

+0

오 세상에 오식이라고 믿을 수 없어 ..... 고마워! 이제는 내부 서버 오류가 있습니다. 다시 한 번 감사드립니다. –