文件上传表格抛出403禁止错误

发布于 2025-01-30 14:18:51 字数 845 浏览 3 评论 0原文

不幸的是,我已经检查了建议的类似问题,这对我没有帮助。希望你们可以给我一些其他建议。

我正在AWS EC2中开发一个网站,我是AWS的新手,文件上传的错误是403错误。因此,我创建了一个仅具有index.php文件的单独文件夹,请参见下面的代码。我评论了文件的PHP部分,仅留下HTML,但我仍然遇到403错误。

HTML负载,我可以选择一个图像,但是当我提交时,它会引发禁止错误。

这里有一些要考虑的事情。

  1. 该网站当前是HTTP。但是我将来会把它变成https。
  2. 文件上传正在我的本地计算机和Siteground云上工作(均为HTTP)。我需要使其在AWS上使用,因为这是客户想要的。
  3. 我已经尝试将文件夹权限调整为775和777。
  4. 该站点没有.htaccess。
  5. 我已经接触了AWS的支持,但回应说,处理此类票的工作人员病了。

自从我一直试图解决这个问题以来已经有一个多星期了。

我还应该尝试什么?我需要修改安全配置吗?请指定。

太感谢了。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文