2015-07-28 104 views
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文件!

+0

你的意思是第一个网站? –

+0

在此服务器上部署的第一个网站。当我不写ServerAlias www.mysecondsite.com时,apache会在第一个网站上重定向。 –

+0

您是否检查过Django应用程序是否可以在Django 1.6和Django 1.8.3上同时使用?并非一切都是兼容的。 – ElmoVanKielmo

回答

0

我修好了!这真的是Django的错误。 DEBUG在settings.py文件中为真值,但仍然会增加500错误。什么是我明白的真正的错误然后我键入python manage.py shell。所以这是The TEMPLATE_DIRS setting must be a tuple. Please fix your settings。感谢大家!