简体   繁体   English

托管在 AWS s3 存储桶上的 php Api

[英]php Api hosted on AWS s3 bucket

I wanna host a php file that retrieve data from a mysql DB how ever aws is not authorizing POST method.我想托管一个从 mysql 数据库检索数据的 php 文件,但是 aws 没有授权 POST 方法。 I need to know how can I add the code in PHP knowing I already configured the Bucket policy and CORS我需要知道如何在 PHP 中添加代码,因为我已经配置了 Bucket 策略和 CORS

You can only serve static content from an S3 - PHP will not be processed.您只能提供来自 S3 的静态内容 - 不会处理 PHP。

If you want to set up a dynamic PHP website on AWS have a look at LightSail and its LAMP stack.如果您想在 AWS 上设置动态 PHP 网站,请查看LightSail及其 LAMP 堆栈。

您应该尝试使用 Amazon API Gateway。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM