0

I host OSQA in AWS EC2 and encounter 500 Server Error while accessing the homepage.

500 Server Error

sorry, system error

system error log is recorded, error will be fixed as soon as possible

The error log file /var/log/apache2/osqa.error.log is empty. Accessing the login page mysite.com/account/signin/ is normal.

Part of settings_local.py is:

#ADMINS and MANAGERS
ADMINS = ()
MANAGERS = ADMINS

DEBUG = False
DEBUG_TOOLBAR_CONFIG = {
    'INTERCEPT_REDIRECTS': True
}
TEMPLATE_DEBUG = DEBUG
INTERNAL_IPS = ('127.0.0.1',)
ALLOWED_HOSTS = ('example.com',)

Is it a problem with permission?

-rw-rw-r-- 1 ubuntu www-pub    0 May 25 18:21 __init__.py
-rw-rw-r-- 1 ubuntu www-pub  242 May 25 18:21 manage.py
-rw-rw-r-- 1 ubuntu www-pub 4556 May 25 18:21 settings.py
-rw-rw-r-- 1 ubuntu www-pub 2257 Jun 25 08:01 settings_local.py
-rw-rw-r-- 1 ubuntu www-pub  429 May 25 18:21 urls.py
SparkAndShine
  • 17,001
  • 22
  • 90
  • 134
  • You need to dump your django logs - 500 is frequently triggered by an error within django, and so you want to see what error it is throwing. By default django won't propagate the full traceback without DEBUG enabled, which you wouldnt want in production. Enable django logging and then look in the log file for the traceback. – jvc26 Jun 25 '15 at 17:04
  • @jvc26 `DEBUG=True`, I got `'NoneType' object is not iterable`. `Error during template rendering` `In template /var/www/osqa/forum/skins/default/templates/index.html, error at line {% sidebar_upper %}` – SparkAndShine Jun 25 '15 at 17:44

1 Answers1

2

The problem results from the higher markdown version (Found existing installation: Markdown 2.6.2), which is reported here.

Install the lower version to solve it:

sudo pip install Markdown==2.4.1
SparkAndShine
  • 17,001
  • 22
  • 90
  • 134