No input file specified when using API v8 with nginx

I am trying to use API v8 on 7.10.25(LTS) and tried 7.11.13(latest). But I just get this error
No input file specified.
I just tried the first API on the doc (access token) here’s my code

$ch = curl_init();

$header = array(
‘Content-type: application/vnd.api+json’,
‘Accept: application/vnd.api+json’,
);
$postStr = json_encode(array(
‘grant_type’ => ‘client_credentials’,
‘client_id’ => ‘86ad013d-fd73-c717-5625-5ed523eac799’,
‘client_secret’ => ‘admin’,
));
$url = ‘https://domain.com/Api/access_token’;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, ‘POST’);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postStr);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);

curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_VERBOSE, true);
$fp = fopen(dirname(FILE).’/errorlog.txt’, ‘w’);
curl_setopt($ch, CURLOPT_STDERR, $fp);

$output = curl_exec($ch);
$out = json_decode($output,true);
print_r ($output);
print_r ($out);

Suit CRM instance is deployed on siteground nginx. The website is secured and have a verified certificate.
I am using shard hosting so i have not control over config file

Related post youve already found : SuiteCRM REST API v8 Not working with Nginx (ubantu 18.0)

Just tying in for reference

Unfortunately this post assumes that it is not shared hosting and i have control over the nginx config file. But yesterday I left comment there.

1 Like