nginx returns html instead of json response

Francis Daly francis at
Fri Nov 18 18:30:18 UTC 2022

On Fri, Nov 18, 2022 at 11:10:20PM +0530, Kaushal Shriyan wrote:
> On Fri, Nov 18, 2022 at 9:37 PM Francis Daly <francis at> wrote:

Hi there,

> Thanks Francis for your email response.  Let me explain with two different
> scenarios :-

Yes, thank you. I believe that what you want is still all clear to me,
apart from the actual specific url patterns that you are using.

I suspect that I am being unclear in the question that I am asking.

Do you actually make an api request for exactly If so, what response do you get?

And if you do not make an api request for exactly that url, can you show
any one url that you do use when making an api request?

What you will eventually want to add to your nginx config is something

	location ^~ /apis/ {
		error_page 555 /dummyfile;
		include fastcgi.conf;
		fastcgi_param SCRIPT_FILENAME something;

but I am unable to guess what the "something" should be. Maybe it should
always be "$document_root/index.php". And maybe different or other config
is needed as well.

Francis Daly        francis at

More information about the nginx mailing list