Help to host a php website with databases on AWS using EC2 or recommended services

Jessica64

Member
May 3, 2022
40
21
8
Babiato's personal talk

My name is Jessica and I'm new to the tech world.

I'm requesting help to host a php script I got from the BABIATO community.

My difficulty is, how can I host this or any script within Amazon?

I can even host using Windows Server and using tools like XAMPP. However, the speed of the site and (I believe) that security can be compromised.

Can someone explain in simple steps or guide me with a link that teaches this?
 

SweaterVest

New member
Jan 27, 2019
6
7
3
Hi Jessica,

I use AWS / EC2 instances for a few years and it's a very solid and cost-effective platform. So I do not use anything else.

1) Create an EC2 instance and install a web server (i.e: choosing a server setup (cpu/ram etc) and linux package (Debian/Ubuntu etc), then installing the basic web server software...)
https://docs.aws.amazon.com/AmazonR...AP_Tutorials.WebServerDB.CreateWebServer.html

2) Install (copy) your php app to your new webserver
** I use WinSCP client to manage files on my cloud-based linux webservers, since I primarily use Windows on my local setup.

** I skipped over DNS, although in reality you will already have a spare domain name registered for your purpose -- and will point it to your new EC2 instance's public IP address after you have created it **

Now.. those two steps will take some time, unless you are already well-versed in basic Linux commands, and the common webserver packages like PHP, Apache/Nginx, MySQL, etc.

The biggest pitfall for most build-it-from-scratch webserver admins is that you will not have the knowledge and skill to avoid getting exploited by attackers, either from automated systems that exploit your open ports and unprotected php scripts, or from accidentally installing malware on your own system. Luckily there are many good ways to protect your server. You have to secure your server: installing firewall, use SSH protection like fail2ban, harden the server packages (php/nginx/mysql). All this does is make you a harder target, no system is 100% safe.

I wish you great luck
 

Jessica64

Member
May 3, 2022
40
21
8
Hi Jessica,

I use AWS / EC2 instances for a few years and it's a very solid and cost-effective platform. So I do not use anything else.

1) Create an EC2 instance and install a web server (i.e: choosing a server setup (cpu/ram etc) and linux package (Debian/Ubuntu etc), then installing the basic web server software...)
https://docs.aws.amazon.com/AmazonR...AP_Tutorials.WebServerDB.CreateWebServer.html

2) Install (copy) your php app to your new webserver
** I use WinSCP client to manage files on my cloud-based linux webservers, since I primarily use Windows on my local setup.

** I skipped over DNS, although in reality you will already have a spare domain name registered for your purpose -- and will point it to your new EC2 instance's public IP address after you have created it **

Now.. those two steps will take some time, unless you are already well-versed in basic Linux commands, and the common webserver packages like PHP, Apache/Nginx, MySQL, etc.

The biggest pitfall for most build-it-from-scratch webserver admins is that you will not have the knowledge and skill to avoid getting exploited by attackers, either from automated systems that exploit your open ports and unprotected php scripts, or from accidentally installing malware on your own system. Luckily there are many good ways to protect your server. You have to secure your server: installing firewall, use SSH protection like fail2ban, harden the server packages (php/nginx/mysql). All this does is make you a harder target, no system is 100% safe.

I wish you great luck
Hi abmiller99. Thank you so much for this information

Well, I followed all the steps mentioned by you above.
But now, my problem is... how can I upload the script to this server? It is running apache and mysql. All ready!

I just need to know how to upload this script to that server?
 

tpetualang

Active member
Mar 30, 2019
446
207
43
Wakanda
temanpetualang.com
Babiato's personal talk

My name is Jessica and I'm new to the tech world.

I'm requesting help to host a php script I got from the BABIATO community.

My difficulty is, how can I host this or any script within Amazon?

I can even host using Windows Server and using tools like XAMPP. However, the speed of the site and (I believe) that security can be compromised.

Can someone explain in simple steps or guide me with a link that teaches this?
better you use a free panel like aapanel
 
  • Wow
Reactions: Jessica64

ckeeper

Well-known member
Nov 8, 2019
623
376
63
You can actually upload the files either with ftp or sftp using the port 22 you allow from security policies as well. Do a quick search in google how to upload files into ec2 using sftp or ftp. But if you want to install a script you might need databases, modify files etc, if you are not comfortable doing these manually, best to use one of the control panels among many cwf, aapanel, cpanel, plesk, cyberpanel etc.
 
  • Like
Reactions: Jessica64

ckeeper

Well-known member
Nov 8, 2019
623
376
63
search for filezilla , you can easily setup sftp or ftp into any instance easily, it should be free.
 
  • Like
Reactions: Jessica64

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu