Bad Request (400) response on previews

1,113 views
Skip to first unread message

Skip S.

unread,
Aug 29, 2014, 7:58:09 PM8/29/14
to wag...@googlegroups.com
Hi there,

I have Wagtail installed using the debian.sh script on a dedicated machine and everything works beautify with '*' in ALLOWED_HOSTS. If I set it to the hostname which in my case is wagtail.local (within nginx conf and /etc/hosts) then everything except preview works which displays a page at http://wagtail.local/admin/pages/preview/ with the text "Bad Request (400)".

Any help is appreciated :-)

Thanks!

Skip S.

unread,
Aug 29, 2014, 8:09:48 PM8/29/14
to wag...@googlegroups.com
Just in case it helps root out the issue I am also seeing the same behavior ( Bad Request ) when viewing drafts from the admin listing. 

Thank you

Karl Hobley

unread,
Sep 1, 2014, 12:22:43 PM9/1/14
to wag...@googlegroups.com
Have you added the following into your nginx configuration?

proxy_set_header Host $host;

Karl Hobley

unread,
Sep 1, 2014, 12:31:48 PM9/1/14
to wag...@googlegroups.com
Ignore that.

What do you have in your MIDDLEWARE_CLASSES setting?

Skip S.

unread,
Sep 2, 2014, 2:19:09 PM9/2/14
to wag...@googlegroups.com
Thank you for your reply.

I was a dumbhead and solved the issues by setting the host to wagtail.local in Django admin Sites section at /django-admin.

pcw

unread,
Jun 19, 2015, 3:13:13 PM6/19/15
to wag...@googlegroups.com
Can you explain a bit more what you did? I have the same problem. Which file did you edit?

Ryne Everett

unread,
Jun 21, 2015, 8:18:35 PM6/21/15
to wag...@googlegroups.com
In case you haven't figured it out yet, make sure the settings at http://localhost:8000/django-admin/wagtailcore/site/2/ are correct.
Reply all
Reply to author
Forward
0 new messages