dtnpzghys01643322
2018-10-22 14:19
浏览 57
已采纳

在AWS上托管角色应用程序使用php

I'm new to AWS. I created a DB and I am currently hosting the website right now. This is great!

The problem is that I don't know how to integrate my PHP files that I was using before the start of AWS.

My previous stack was: Angular, MyPHP, MySQL, Apache. Everything was running locally. So I was able to use the same IP for the database and to also run php files.

What I tried to do was upload the php files into the S3 bucket. This doesn't work. The website will only download the file and not execute.

So how would I implement the same fluid way of integrating PHP on AWS as I did on my local computer?

图片转代码服务由CSDN问答提供 功能建议

我是AWS的新手。 我创建了一个数据库,我现在正在托管该网站。 这很棒!

问题在于我不知道如何在AWS启动之前集成我正在使用的PHP文件。

我之前的堆栈是:Angular,MyPHP,MySQL,Apache。 一切都在本地运行。 所以我能够为数据库使用相同的IP并运行php文件。

我尝试做的是将php文件上传到S3存储桶。 这不起作用。 该网站只下载文件而不执行。

那么我如何实现在AWS上集成PHP的流畅方式,就像我在本地计算机上一样?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • doutao4938 2018-10-22 14:51
    已采纳

    If you want to do this on AWS you will need an EC2 instance to run your dynamic queries to the database. S3 will only host static files or programming which works on the client-side (JavaScript).

    If it is a basic website, you might want to consider LightSail

    点赞 打赏 评论
  • dongliang1893 2018-10-22 14:54

    My suggestions would be,

    1. use EC2 instead of using s3 for hosting the PHP website as you can have complete control over the server.
    2. For setting up EC2 with PHP please follow the steps in the following article. Setting up EC2(ubuntu instance) for php
    点赞 打赏 评论

相关推荐 更多相似问题