0
我在Ubuntu 14.04上使用python 2.7.6和Django 1.6網站的Apache2服務器。明天我通過sudo easy_install --upgrade django
將Django升級到1.8.3。之後,只有第一個網站正在工作。其他網站出現500錯誤。這是Apache日誌Django升級後的錯誤500
[Mon Jul 27 06:25:07.379926 2015] [mpm_event:notice] [pid 22488:tid 140625830381440] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations
[Mon Jul 27 06:25:07.379972 2015] [core:notice] [pid 22488:tid 140625830381440] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 27 11:30:28.661967 2015] [mpm_event:notice] [pid 22488:tid 140625830381440] AH00491: caught SIGTERM, shutting down
[Mon Jul 27 11:30:29.777150 2015] [mpm_event:notice] [pid 14809:tid 140681711728512] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations
[Mon Jul 27 11:30:29.777224 2015] [core:notice] [pid 14809:tid 140681711728512] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 27 11:32:19.185498 2015] [mpm_event:notice] [pid 14809:tid 140681711728512] AH00491: caught SIGTERM, shutting down
[Mon Jul 27 11:32:20.263081 2015] [mpm_event:notice] [pid 15251:tid 140212319471488] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations
[Mon Jul 27 11:32:20.263186 2015] [core:notice] [pid 15251:tid 140212319471488] AH00094: Command line: '/usr/sbin/apache2'
[Tue Jul 28 08:02:22.246092 2015] [mpm_event:notice] [pid 15251:tid 140212319471488] AH00491: caught SIGTERM, shutting down
[Tue Jul 28 08:02:23.297084 2015] [mpm_event:notice] [pid 17323:tid 140099360208768] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations
[Tue Jul 28 08:02:23.297185 2015] [core:notice] [pid 17323:tid 140099360208768] AH00094: Command line: '/usr/sbin/apache2'
[Tue Jul 28 08:11:13.768112 2015] [mpm_event:notice] [pid 17323:tid 140099360208768] AH00491: caught SIGTERM, shutting down
[Tue Jul 28 08:11:14.881159 2015] [mpm_event:notice] [pid 17844:tid 140223468337024] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations
[Tue Jul 28 08:11:14.881229 2015] [core:notice] [pid 17844:tid 140223468337024] AH00094: Command line: '/usr/sbin/apache2'
[Tue Jul 28 09:05:13.986042 2015] [mpm_event:notice] [pid 17844:tid 140223468337024] AH00491: caught SIGTERM, shutting down
[Tue Jul 28 09:05:15.076053 2015] [mpm_event:notice] [pid 18544:tid 140727691057024] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations
[Tue Jul 28 09:05:15.076167 2015] [core:notice] [pid 18544:tid 140727691057024] AH00094: Command line: '/usr/sbin/apache2'
[Tue Jul 28 09:57:24.254449 2015] [mpm_event:notice] [pid 18544:tid 140727691057024] AH00491: caught SIGTERM, shutting down
[Tue Jul 28 09:57:25.319182 2015] [mpm_event:notice] [pid 19105:tid 140677893478272] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations
[Tue Jul 28 09:57:25.319282 2015] [core:notice] [pid 19105:tid 140677893478272] AH00094: Command line: '/usr/sbin/apache2'
[Tue Jul 28 09:57:45.336099 2015] [mpm_event:notice] [pid 19105:tid 140677893478272] AH00491: caught SIGTERM, shutting down
[Tue Jul 28 09:57:46.407414 2015] [mpm_event:notice] [pid 19533:tid 139860213520256] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations
[Tue Jul 28 09:57:46.407495 2015] [core:notice] [pid 19533:tid 139860213520256] AH00094: Command line: '/usr/sbin/apache2'
[Tue Jul 28 09:58:30.278006 2015] [mpm_event:notice] [pid 19533:tid 139860213520256] AH00493: SIGUSR1 received. Doing graceful restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 2a01:4f8:d15:dc0::2. Set the 'ServerName' directive globally to suppress this message
[Tue Jul 28 09:58:30.512300 2015] [mpm_event:notice] [pid 19533:tid 139860213520256] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations
[Tue Jul 28 09:58:30.512326 2015] [core:notice] [pid 19533:tid 139860213520256] AH00094: Command line: '/usr/sbin/apache2'
[Tue Jul 28 09:58:45.286141 2015] [mpm_event:notice] [pid 19533:tid 139860213520256] AH00493: SIGUSR1 received. Doing graceful restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 2a01:4f8:d15:dc0::2. Set the 'ServerName' directive globally to suppress this message
[Tue Jul 28 09:58:45.392009 2015] [mpm_event:notice] [pid 19533:tid 139860213520256] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations
[Tue Jul 28 09:58:45.392031 2015] [core:notice] [pid 19533:tid 139860213520256] AH00094: Command line: '/usr/sbin/apache2'
[Tue Jul 28 10:02:35.249547 2015] [mpm_event:notice] [pid 19533:tid 139860213520256] AH00491: caught SIGTERM, shutting down
[Tue Jul 28 10:02:36.323445 2015] [mpm_event:notice] [pid 20874:tid 139918807410560] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations
[Tue Jul 28 10:02:36.323553 2015] [core:notice] [pid 20874:tid 139918807410560] AH00094: Command line: '/usr/sbin/apache2'
這是該項目
import os
import sys
sys.path.append('/var/www/myproject')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myproject.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
感謝諮詢wsgi.py文件!
你的意思是第一個網站? –
在此服務器上部署的第一個網站。當我不寫ServerAlias www.mysecondsite.com時,apache會在第一個網站上重定向。 –
您是否檢查過Django應用程序是否可以在Django 1.6和Django 1.8.3上同時使用?並非一切都是兼容的。 – ElmoVanKielmo