Web Hosting on Amazon AWS (PHP + MySQL)

后端 未结 3 1122
北海茫月
北海茫月 2020-12-23 03:42

I am totally confused on how to host a Dynamic website created using PHP and MySQL in Amazon Cloud.

I went through Amazon S3

3条回答
  •  再見小時候
    2020-12-23 04:42

    Depends on your needs. Elastic Beanstalk might be a good option for many apps, but I chose EC2 for my app's backend (using PHP, MySQL and S3 for storage).

    Quick steps to get you up and running:

    1. Log into the AWS Mangement Console and start a new EC instance (Windows server 2012 R2 Base > t2.micro should be good enough for a start!)

    2. At step "6. Configure Security Group", add Rules for at least HTTP, HTTPS and RDP (so you can connnect via Remote Desktop)

    3. Connect to your new instance via Remote Desktop and install a decent browser (Enable File Downloads in IE's Security Settings and download Chrome or Firefox)

    4. Open the Windows Firewall and add rules for the same ports you opened in the Security Group of your Instance in the AWS Management Console. (Right-click on “Inbound Rules”, then select “New Rule…”)

    5. Download and install XAMPP (I put it in C:\xampp)

    6. Open the XAMPP Control panel and install Apache and MySQL as services (so they will start automatically when your instance launches); make sure everything is started up.

    7. Now put your files in C:\xampp\htdocs\ and you're ready to go!

    Bonus Steps:

    • Set up Filezilla FTP Server (and open the required ports in both the instance's security group and the Windows Firewall) so you can upload/download files without having to go through Remote Desktop.

    • Get an Elastic IP and assign it to your instance, so it's IP address will never change.

    • Get an SSL certificate so you can use HTTPS

提交回复
热议问题