'File Upload Form Throws 403 Forbidden Error

I already checked the suggested similar questions, unfortunately, it doesn't help me. Hopefully, you guys can give me some additional suggestions.

I am developing a website in AWS EC2 and I'm new to AWS, the file upload is throwing 403 error. So I created a separate folder that only has index.php file, see the code below. I commented out the PHP part of the file and only leave the HTML but I still get a 403 error.

enter image description here

The HTML loads and I am able to select an image, but when I submit it, it throws a forbidden error. enter image description here

Here are some things to consider.

  1. The site is currently HTTP. But I will make it HTTPS in the future.
  2. The file upload is working on my local computer and Siteground cloud (both are HTTP). I need to make it work on AWS because that is what the client wants.
  3. I already tried adjusting the folder permission to 775 and 777.
  4. The site does not have .htaccess.
  5. I already reached out to AWS support but got a response that the staff handling this kind of ticket is sick.

It's been more than a week since I've been trying to figure this out.

What other things should I try? Is there a security configuration I need to modify? Please specify.

Thank you so much.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source