Error 404 Not Found (LAMP AWS Lightsail) For API

Keywords: LAMP/MAMP/WAMP - AWS - How to - Other

Description:
Hey, I can use the API GET function, but the POST function returns 404 every time. I am using LAMP 7.4 AWS Lightsail. I have referred to Bitnami forums and implemented “Authorization header,” but this did not solve the problem. I have added this below code at the bottom of the file (/opt/bitnami/apache/conf) and restarted Apache. but didn’t solve it. Can anyone help?

RewriteEngine on
RewriteCond %{HTTP:Authorization} ^(.)
RewriteRule ^(.
) - [E=HTTP_AUTHORIZATION:%1]
SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1

I forgot to mention that this is a custom PHP application.

Hi @kickpupco,

Can you check this video?

https://www.youtube.com/watch?v=pmfVL3yeq84

Regards,
Michiel