2016-11-17 6 views
0

wsgi modを使用してWindowsサーバー上でApacheにdjangoを接続しようとしています。 私はhttpd.exeを実行しているときにすぐにシャットダウンします。私はこの得たのerror.logで :Windows上のPython-Django-WSGI-Apache - "ImportError:No module named site"

[Thu Nov 17 00:44:19.918823 2016] [wsgi:warn] [pid 520:tid 452] mod_wsgi: Compiled for Python/2.7.9+. 
[Thu Nov 17 00:44:19.918823 2016] [wsgi:warn] [pid 520:tid 452] mod_wsgi: Runtime using Python/2.7.11. 
[Thu Nov 17 00:44:19.918823 2016] [mpm_winnt:notice] [pid 520:tid 452] AH00455: Apache/2.4.23 (Win64) mod_wsgi/4.4.12 Python/2.7.11 configured -- resuming normal operations 
[Thu Nov 17 00:44:19.918823 2016] [mpm_winnt:notice] [pid 520:tid 452] AH00456: Apache Lounge VC10 Server built: Jul 9 2016 11:59:00 
[Thu Nov 17 00:44:19.918823 2016] [core:notice] [pid 520:tid 452] AH00094: Command line: 'httpd -d C:/Apache24' 
[Thu Nov 17 00:44:19.918823 2016] [core:debug] [pid 520:tid 452] log.c(1543): AH02639: Using SO_REUSEPORT: no (0) 
[Thu Nov 17 00:44:19.918823 2016] [mpm_winnt:notice] [pid 520:tid 452] AH00418: Parent: Created child process 2308 
[Thu Nov 17 00:44:19.918823 2016] [mpm_winnt:debug] [pid 520:tid 452] mpm_winnt.c(429): AH00402: Parent: Sent the scoreboard to the child 
[Thu Nov 17 00:44:20.043916 2016] [wsgi:warn] [pid 2308:tid 448] mod_wsgi: Compiled for Python/2.7.9+. 
[Thu Nov 17 00:44:20.043916 2016] [wsgi:warn] [pid 2308:tid 448] mod_wsgi: Runtime using Python/2.7.11. 
[Thu Nov 17 00:44:20.043916 2016] [mpm_winnt:debug] [pid 2308:tid 448] mpm_winnt.c(1718): AH00453: Child process is running 
[Thu Nov 17 00:44:20.043916 2016] [wsgi:info] [pid 2308:tid 448] mod_wsgi (pid=2308): Initializing Python. 
ImportError: No module named site 
[Thu Nov 17 00:44:20.059467 2016] [mpm_winnt:crit] [pid 520:tid 452] AH00419: master_main: create child process failed. Exiting. 
[Thu Nov 17 00:44:20.059467 2016] [core:info] [pid 520:tid 452] AH00096: removed PID file C:/Apache24/logs/httpd.pid (pid=520) 

私のPythonのバージョンは2.7.11 私のApacheのバージョンでは、2.4.23

答えて

0

である私は私の質問への答えを見つけた: Apacheサーバの実行しますPythonではなく、正しいものです。これは、Pythonへのパスを示し

WSGIPythonHome C:/Python27 

: は、私はこのようなhttpd.confファイルでのpythonのパスと特定しなければなりませんでした。

関連する問題