Hello, I have a PHP CodeIgniter project that needs to separate between client side and server side. I’m using guzzle to make rest api. The problem is client side can’t retrieve data from rest api since few days ago and show HTTP error 500. Before this happened, my project is working properly on both local and hosting. This problem just happens on hosting. It works fine on my local and I can retrieve data with postman from my rest api and my local.

Please help me

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi there @tobiasjaya,

I would recommend starting with checking the logs, in there you will find more information on what the actual problem is rather than the generic 500 error.

To check the logs for Apache you can do that with the following command:

  • sudo tail -100 /var/log/apache2/error.log

For more information on how to troubleshoot common problems with Apache I could suggest this post here:

https://www.digitalocean.com/community/tutorials/how-to-troubleshoot-common-apache-errors

Let me know how it goes!
Regards,
Bobby

by Jamon Camisso
There are three main commands, and a set of common log locations that you can use to get started troubleshooting Apache errors. Generally when you are troubleshooting Apache, you will use these commands in the order indicated here, and then examine log files for specific…
Submit an Answer