Bad Request (400) while hosting osqa to AWS EC2

1k views Asked by At

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.

1

There are 1 answers

2
user3720148 On BEST ANSWER

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',)