Forbidden error with Cloudfront CDN


I am trying to setup a Cloudfront CDN.
However, I get an error as you can see here :
It seems to be related to hosting software configuration i.e Grav or ServerPilot

I run on nginx (check below), so it can’t be a .htaccess issue.
I suspect ServerPilot and a missing config on it, but i didn’t find anything about it.

Any idea?

My Website config :

EC2 + ServerPilot + PHP7

Amazon Machine Image (AMI)
Ubuntu Server 20.04 LTS (HVM),EBS General Purpose (SSD) Volume Type. 64 bits (x86)

EC2 instance type

Web server

✓ I solved this issue ✓

A 403 is being returned, as that request from CloudFront is being made to : - - [26/Jul/2021:22:57:40 +0000] "GET /favicon.ico HTTP/1.1" 403 461 "-" "Amazon CloudFront" "" 340 0.001 "859" "0.000" ""

[Mon Jul 26 22:57:40.153019 2021] [access_compat:error] [pid 19703:tid 140447217338112] [client] AH01797: client denied by server configuration: /opt/sp/apache/htdocs/favicon.ico

The solution is simply to add as a domain to my ServerPilot app.

Capture d’écran 2021-07-27 à 16 19 47

And voilà!