How to solve 403 Forbidden error?

I’ve got a php page that makes a curl request to another page on the same website.
As curl url I’ve set “http://localhost/pathToOtherPage”.
When I open the page with the curl script I get:

Forbidden
You don’t have permission to access /dashboard/api/http.php/tickets.json on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

I’ve entirely set the files permissions to 755 but I still get the error.
Is it a problem that needs to be solved by an hosting administrator?
Thanks for the help.

Why are you using localhost? :slight_smile:

The problem is that I’m using a CMS (osTicket) that receives requests at the cURL page. Then the cURL page makes the request to osTicket (on the same server). OsTicket accepts requests from known clients that it remembers JUST from their IP address. So I need to make sure that osTicket is able to accept the requests from the cURL page. And since I can only tell osTicket to accept requests from an IP address I thought I might use the localhost IP: 127.0.0.1.
I can’t tell osTicket to accept requests from the website public IP address because the website lives on a shared hosting and I don’t have a direct public IP address to my website.
Hope I haven’t made it more confusing.

Maybe premium hosting would work? :slight_smile:

1 Like