2016-09-29 2 views
2

Also versuche ich, mein django-Projekt auf einem Windows-Server mit Apache 2.4 mit mod_wsgi und Pythong 3.4 zu implementieren. Bevor ich httpd.conf konfiguriere und versuche, Apache mit installiertem mod-wsgi zu starten, funktioniert es und zeigt mir, dass es funktioniert. dann habe ich die folgende Konfiguration in httpd.conf:Apache 2.4 mit mod_wsgi: 403 Verboten, keine Berechtigung zum Zugriff auf/calbase auf diesem Server

# 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> 

Und dann versuchen zu localhost zu gehen: 8080 (ich den Port 80-8080 geändert), ich habe diesen Fehler zu sagen:

Forbidden

Sie sind nicht berechtigt, auf diesen Server zuzugreifen.

Und unten ist die relevante 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 

Könnte jemand bitte helfen? TIA.

Antwort

3

Der Abschnitt:

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

hat einen Verzeichnisnamen, die nicht dem entsprechen, was in der WSGIScriptAlias Richtlinie verwendet wird. Man verwendet equipcal und die anderen equipcale. Sie müssen in diesem Segmentnamen übereinstimmen.

+0

Oh mein Gott kann nicht glauben, dass es ein Tippfehler war ..... vielen Dank! Jetzt hat es einen internen Serverfehler, an dem ich arbeiten könnte. Danke noch einmal –

Verwandte Themen