1

I host osqa to AWS EC2 Ubuntu. While accessing my website, encouter Bad Request (400)

Bad Request (400)

I check the log info. There is nothing in /var/log/apache2/osqa.error.log and /var/log/apache2/osqa.access.log is as follows:

84.97.200.240 - - [07/Jun/2015:16:26:43 +0000] "GET /favicon.ico HTTP/1.1" 400 205 84.97.200.240 - - [07/Jun/2015:16:26:44 +0000] "GET /favicon.ico HTTP/1.1" 400 205 84.97.200.240 - - [07/Jun/2015:16:28:37 +0000] "GET / HTTP/1.1" 400 205 84.97.200.240 - - [07/Jun/2015:16:29:01 +0000] "GET / HTTP/1.1" 400 205

I don't know what is going on and how to fix it.

SparkAndShine
  • 17,001
  • 22
  • 90
  • 134

1 Answers1

3

I hope you have already renamed settings_local.py.dist to settings_local.py. Then open the settings_local.py and add your local host names to ALLOWED_HOSTS setting.

EX:

ALLOWED_HOSTS = ('yourhostname.com','localhost','127.0.0.1',)
SparkAndShine
  • 17,001
  • 22
  • 90
  • 134
  • thx. Now, I can access my website but encounter `500 Server Error`. And the error log file `/var/log/apache2/osqa.error.log` is empty. – SparkAndShine Jun 25 '15 at 07:48
  • What's your installed version of markdown? There is an incompatibility issue in OSQA with the new versions of markdown. Try 2.4.1. Command "pip install "markdown==2.4.1". – user3720148 Jun 25 '15 at 10:58