WebFaction
Community site: login faq

I have a web2py-based website that uses a bit of ajax to communicate with the web2py server side. It works perfectly when I use Apache, but fails when I use uwsgi-nginx.

Chrome Developer Console shows an error "Uncaught SyntaxError: Unexpected end of input." and also an error on the callback to the web2py method that handles the ajax.

Safari Error Log shows an error "Syntax error: Unexpected end of script" and an error at the web2py ajax callback method, with the line "Failed to load resource: the server responded with a status of 502 (Bad Gateway)"

I'm guessing that nginx requires some configuration to use ajax, but I've been unable to find anything discussing that.

Any and all ideas will be gratefully appreciated!

asked 19 Jan '16, 03:56

John Z
114
accept rate: 0%

edited 19 Jan '16, 03:57

What does your Nginx error log (in ~/logs/user) show?

(19 Jan '16, 18:16) seanf

This does not create an entry in the nginx error log.

(19 Jan '16, 23:07) John Z

Okay, I think we can help you better if you submit a support ticket so we can take a look at the application in question.

(20 Jan '16, 04:53) NickR ♦♦

Ticket submitted: CIX-239504. Thanks for your help.

(20 Jan '16, 17:45) John Z
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×186
×24

question asked: 19 Jan '16, 03:56

question was seen: 2,357 times

last updated: 20 Jan '16, 17:45

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM