XF 2.1 404 Not Found API Endpoint

JohnLR

Member
Hi xenForo Community,

Hopefully this is the right section, I apologise if this isn't.

Currently have an issue with the API Endpoint, here's the server details:

xenForo: v2.1.10 Patch 2
PHP: 7.4.9
MySQL: 10.3.23-MariaDB
Web: nginx/1.19.1

I've followed:
https://xenforo.com/community/resources/how-to-call-the-xenforo-api.7875/
https://xenforo.com/xf2-docs/dev/rest-api/

For now, through Postman I've set it up as https://[FQDN]/api/threads/ - But no matter what I do, I always get 404 not found. My nginx config looks like a standard setup and we don't use friendly URL's. I've also tried https://[FQDN]/index.php/api/threads/ and https://[FQDN]/index.php?api/threads/

Really sorry if this is such a newb question, getting stuck on such a basic step is frustrating. The NGINX error logs are showing: "/home/nginx/domains/[FQDN]/public/api/threads/2/index.php" is not found (2: No such file or directory)" and if it's relevant I use CENTMINMOD beta stable and CENTOS 7.6 - Everything is patched.

Also downloaded the install files and don't see the api folder as a default.

Any tips is really appreciated.
 
My nginx config looks like a standard setup and we don't use friendly URL's
API request will have use friendly URLs.

Really sorry if this is such a newb question, getting stuck on such a basic step is frustrating. The NGINX error logs are showing: "/home/nginx/domains/[FQDN]/public/api/threads/2/index.php" is not found (2: No such file or directory)" and if it's relevant I use CENTMINMOD beta stable and CENTOS 7.6 - Everything is patched.
What does your nginx for [FQDN] look like?
 
I don't use centminmod so I have no clue how and where to edit the configs but try adding:
Code:
    location / {
        try_files $uri $uri/ /index.php?$uri&$args;
    }
to [FQDN].ssl.conf?
 
Top Bottom