2016-10-10 2 views
-1

Laut Anleitung habe ich die mod_wsgi-win32-ap22py27-3.3.so heruntergeladen, in mod_wsgi.so umbenannt und in den Ordner/modules von Apache gestellt.Ich kann meinen Apache nicht mit mod_wsgi arbeiten

Als nächstes habe ich die 'LoadModule wsgi_module modules/mod_wsgi.so' Zeile zu der httpd.conf hinzugefügt.

Beim Start Apache übergibt es mir diesen Fehler: "Die angeforderte Operation ist fehlgeschlagen!"

Dies ist der Ausgang des error.log:

Starting the Apache2.2 service 
The Apache2.2 service is running. 
] Apache/2.2.25 (Win32) configured -- resuming normal operations 
[Fri Oct 07 12:59:37 2016] [notice] Server built: Jul 10 2013 01:52:12 
[Fri Oct 07 12:59:37 2016] [notice] Parent: Created child process 3420 
[Fri Oct 07 12:59:38 2016] [notice] Child 3420: Child process is running 
[Fri Oct 07 12:59:38 2016] [notice] Child 3420: Acquired the start mutex. 
[Fri Oct 07 12:59:38 2016] [notice] Child 3420: Starting 64 worker threads. 
[Fri Oct 07 12:59:38 2016] [notice] Child 3420: Starting thread to listen on port 80. 
[Fri Oct 07 12:59:58 2016] [error] [client 127.0.0.1] File does not exist: C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/favicon.ico 
[Fri Oct 07 12:59:59 2016] [error] [client 127.0.0.1] File does not exist: C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/favicon.ico 
[Fri Oct 07 13:01:05 2016] [notice] Parent: Received shutdown signal -- Shutting down the server. 
[Fri Oct 07 13:01:05 2016] [notice] Child 3420: Exit event signaled. Child process is ending. 
[Fri Oct 07 13:01:06 2016] [notice] Child 3420: Released the start mutex 
[Fri Oct 07 13:01:07 2016] [notice] Child 3420: All worker threads have exited. 
[Fri Oct 07 13:01:07 2016] [notice] Child 3420: Child process is exiting 
[Fri Oct 07 13:01:07 2016] [notice] Parent: Child process exited successfully. 
[Fri Oct 07 13:07:27 2016] [warn] mod_wsgi: Compiled for Python/2.7. 
[Fri Oct 07 13:07:27 2016] [warn] mod_wsgi: Runtime using Python/2.7.11. 
[Fri Oct 07 13:07:27 2016] [notice] Apache/2.2.25 (Win32) mod_wsgi/3.3 Python/2.7.11 configured -- resuming normal operations 
[Fri Oct 07 13:07:27 2016] [notice] Server built: Jul 10 2013 01:52:12 
[Fri Oct 07 13:07:27 2016] [notice] Parent: Created child process 7712 
[Fri Oct 07 13:07:28 2016] [warn] mod_wsgi: Compiled for Python/2.7. 
[Fri Oct 07 13:07:28 2016] [warn] mod_wsgi: Runtime using Python/2.7.11. 
[Fri Oct 07 13:07:28 2016] [notice] Child 7712: Child process is running 
ImportError: No module named site 
[Fri Oct 07 13:07:28 2016] [crit] (OS 1813)Der angegebene Ressourcentyp wurde nicht in der Image-Datei gefunden. : master_main: create child process failed. Exiting. 
[Fri Oct 07 13:42:17 2016] [notice] Apache/2.2.25 (Win32) configured -- resuming normal operations 
[Fri Oct 07 13:42:17 2016] [notice] Server built: Jul 10 2013 01:52:12 
[Fri Oct 07 13:42:17 2016] [notice] Parent: Created child process 5752 
[Fri Oct 07 13:42:17 2016] [notice] Child 5752: Child process is running 
[Fri Oct 07 13:42:17 2016] [notice] Child 5752: Acquired the start mutex. 
[Fri Oct 07 13:42:17 2016] [notice] Child 5752: Starting 64 worker threads. 
[Fri Oct 07 13:42:17 2016] [notice] Child 5752: Starting thread to listen on port 80. 
[Fri Oct 07 13:42:28 2016] [notice] Parent: Received restart signal -- Restarting the server. 
[Fri Oct 07 13:42:28 2016] [notice] Child 5752: Exit event signaled. Child process is ending. 
[Fri Oct 07 13:42:28 2016] [notice] Apache/2.2.25 (Win32) configured -- resuming normal operations 
[Fri Oct 07 13:42:28 2016] [notice] Server built: Jul 10 2013 01:52:12 
[Fri Oct 07 13:42:28 2016] [notice] Parent: Created child process 5828 
[Fri Oct 07 13:42:28 2016] [warn] mod_wsgi: Compiled for Python/2.7.9+. 
[Fri Oct 07 13:42:28 2016] [warn] mod_wsgi: Runtime using Python/2.7.11. 
[Fri Oct 07 13:42:28 2016] [notice] Child 5828: Child process is running 
ImportError: No module named site 
[Fri Oct 07 13:42:28 2016] [crit] (OS 1813)Der angegebene Ressourcentyp wurde nicht in der Image-Datei gefunden. : master_main: create child process failed. Exiting. 
[Fri Oct 07 13:42:29 2016] [notice] Child 5752: Released the start mutex 
[Fri Oct 07 13:42:30 2016] [notice] Child 5752: All worker threads have exited. 
[Fri Oct 07 13:42:30 2016] [notice] Child 5752: Child process is exiting 
[Fri Oct 07 13:43:17 2016] [warn] mod_wsgi: Compiled for Python/2.7.9+. 
[Fri Oct 07 13:43:17 2016] [warn] mod_wsgi: Runtime using Python/2.7.11. 
[Fri Oct 07 13:43:17 2016] [notice] Apache/2.2.25 (Win32) mod_wsgi/4.4.12 Python/2.7.11 configured -- resuming normal operations 
[Fri Oct 07 13:43:17 2016] [notice] Server built: Jul 10 2013 01:52:12 
[Fri Oct 07 13:43:17 2016] [notice] Parent: Created child process 1200 
[Fri Oct 07 13:43:17 2016] [warn] mod_wsgi: Compiled for Python/2.7.9+. 
[Fri Oct 07 13:43:17 2016] [warn] mod_wsgi: Runtime using Python/2.7.11. 
[Fri Oct 07 13:43:17 2016] [notice] Child 1200: Child process is running 
ImportError: No module named site 
[Fri Oct 07 13:43:17 2016] [crit] (OS 1813)Der angegebene Ressourcentyp wurde nicht in der Image-Datei gefunden. : master_main: create child process failed. Exiting. 
[Fri Oct 07 14:01:14 2016] [warn] mod_wsgi: Compiled for Python/2.7.9+. 
[Fri Oct 07 14:01:14 2016] [warn] mod_wsgi: Runtime using Python/2.7.11. 
[Fri Oct 07 14:01:14 2016] [notice] Apache/2.2.25 (Win32) mod_wsgi/4.4.12 Python/2.7.11 configured -- resuming normal operations 
[Fri Oct 07 14:01:14 2016] [notice] Server built: Jul 10 2013 01:52:12 
[Fri Oct 07 14:01:14 2016] [notice] Parent: Created child process 6128 
[Fri Oct 07 14:01:14 2016] [warn] mod_wsgi: Compiled for Python/2.7.9+. 
[Fri Oct 07 14:01:14 2016] [warn] mod_wsgi: Runtime using Python/2.7.11. 
[Fri Oct 07 14:01:14 2016] [notice] Child 6128: Child process is running 
ImportError: No module named site 
[Fri Oct 07 14:01:14 2016] [crit] (OS 1813)Der angegebene Ressourcentyp wurde nicht in der Image-Datei gefunden. : master_main: create child process failed. Exiting. 
[Fri Oct 07 14:01:24 2016] [notice] Apache/2.2.25 (Win32) configured -- resuming normal operations 
[Fri Oct 07 14:01:24 2016] [notice] Server built: Jul 10 2013 01:52:12 
[Fri Oct 07 14:01:24 2016] [notice] Parent: Created child process 8268 
[Fri Oct 07 14:01:24 2016] [notice] Child 8268: Child process is running 
[Fri Oct 07 14:01:24 2016] [notice] Child 8268: Acquired the start mutex. 
[Fri Oct 07 14:01:24 2016] [notice] Child 8268: Starting 64 worker threads. 
[Fri Oct 07 14:01:24 2016] [notice] Child 8268: Starting thread to listen on port 80. 
[Fri Oct 07 14:01:29 2016] [notice] Parent: Received shutdown signal -- Shutting down the server. 
[Fri Oct 07 14:01:29 2016] [notice] Child 8268: Exit event signaled. Child process is ending. 
[Fri Oct 07 14:01:30 2016] [notice] Child 8268: Released the start mutex 
[Fri Oct 07 14:01:31 2016] [notice] Child 8268: All worker threads have exited. 
[Fri Oct 07 14:01:31 2016] [notice] Child 8268: Child process is exiting 
[Fri Oct 07 14:01:31 2016] [notice] Parent: Child process exited successfully. 
[Mon Oct 10 09:37:29 2016] [warn] mod_wsgi: Compiled for Python/2.7.9+. 
[Mon Oct 10 09:37:29 2016] [warn] mod_wsgi: Runtime using Python/2.7.11. 
[Mon Oct 10 09:37:29 2016] [notice] Apache/2.2.25 (Win32) mod_wsgi/4.4.12 Python/2.7.11 configured -- resuming normal operations 
[Mon Oct 10 09:37:29 2016] [notice] Server built: Jul 10 2013 01:52:12 
[Mon Oct 10 09:37:29 2016] [notice] Parent: Created child process 1012 
[Mon Oct 10 09:37:29 2016] [warn] mod_wsgi: Compiled for Python/2.7.9+. 
[Mon Oct 10 09:37:29 2016] [warn] mod_wsgi: Runtime using Python/2.7.11. 
[Mon Oct 10 09:37:29 2016] [notice] Child 1012: Child process is running 
ImportError: No module named site 
[Mon Oct 10 09:37:29 2016] [crit] (OS 1813)Der angegebene Ressourcentyp wurde nicht in der Image-Datei gefunden. : master_main: create child process failed. Exiting. 
[Mon Oct 10 09:37:55 2016] [notice] Apache/2.2.25 (Win32) configured -- resuming normal operations 
[Mon Oct 10 09:37:55 2016] [notice] Server built: Jul 10 2013 01:52:12 
[Mon Oct 10 09:37:55 2016] [notice] Parent: Created child process 6368 
[Mon Oct 10 09:37:55 2016] [notice] Child 6368: Child process is running 
[Mon Oct 10 09:37:55 2016] [notice] Child 6368: Acquired the start mutex. 
[Mon Oct 10 09:37:55 2016] [notice] Child 6368: Starting 64 worker threads. 
[Mon Oct 10 09:37:55 2016] [notice] Child 6368: Starting thread to listen on port 80. 
[Mon Oct 10 09:38:14 2016] [notice] Parent: Received restart signal -- Restarting the server. 
[Mon Oct 10 09:38:14 2016] [notice] Child 6368: Exit event signaled. Child process is ending. 
[Mon Oct 10 09:38:15 2016] [notice] Apache/2.2.25 (Win32) configured -- resuming normal operations 
[Mon Oct 10 09:38:15 2016] [notice] Server built: Jul 10 2013 01:52:12 
[Mon Oct 10 09:38:15 2016] [notice] Parent: Created child process 7484 
[Mon Oct 10 09:38:15 2016] [warn] mod_wsgi: Compiled for Python/2.7.9+. 
[Mon Oct 10 09:38:15 2016] [warn] mod_wsgi: Runtime using Python/2.7.11. 
[Mon Oct 10 09:38:15 2016] [notice] Child 7484: Child process is running 
ImportError: No module named site 
[Mon Oct 10 09:38:15 2016] [crit] (OS 1813)Der angegebene Ressourcentyp wurde nicht in der Image-Datei gefunden. : master_main: create child process failed. Exiting. 
[Mon Oct 10 09:38:15 2016] [warn] (OS 995)Der E/A-Vorgang wurde wegen eines Threadendes oder einer Anwendungsanforderung abgebrochen. : winnt_accept: Asynchronous AcceptEx failed. 
[Mon Oct 10 09:38:15 2016] [notice] Child 6368: Released the start mutex 
[Mon Oct 10 09:38:16 2016] [notice] Child 6368: All worker threads have exited. 
[Mon Oct 10 09:38:16 2016] [notice] Child 6368: Child process is exiting 

Ich bin nicht sicher, was das Problem ist genau das, da die mod_wsg für Python 2.7 ist, und ich bin mit Python 2.7 (32 Bit) zusätzlich zu Apache 2.2 (32 Bit).

Antwort

1

Das Problem wurde behoben.

Ich musste die Umgebungsvariablen PYTHONHOME und PYTHONPATH dafür setzen, um den 'ImportError: Kein Modul namens Standort' Fehler zu beheben.

set PYTHONHOME=c:\Python27 
set PYTHONPATH=c:\Python27\Lib 
set PATH=%PYTHONHOME%;%PATH% 
+0

Sie sollten diese nicht festlegen müssen. Das hast du vorgeschlagen, Python wurde nicht für alle Benutzer der Maschine richtig installiert. Es könnte besser sein, Python zu deinstallieren und es neu zu installieren. Stellen Sie sicher, dass Sie es für alle Benutzer installieren. –

Verwandte Themen