This project demonstrates the deployment of a user registration form integrated with a MySQL database, hosted on an AWS EC2 instance using the LEMP Stack (Linux, Nginx, MySQL, and PHP).
-
Design and develop a user registration form.
-
Integrate form data with a MySQL database.
-
Deploy the application on a cloud-based AWS EC2 instance.
-
AWS account with EC2 access
-
Key pair for SSH
-
Basic knowledge of terminal commands and AWS
-
MySQL and PHP experience (preferred)
Go to AWS Management Console → Search for EC2.
-
Under Instances, click Launch Instance.
-
AMI: Amazon Linux 2 AMI (Free Tier eligible)
-
Key pair: Create/use existing one
-
Security group: Allow ports 22 (SSH) and 80 (HTTP)
-
Click Launch Instance
- sudo -i
- Create lemp.sh Script
-
vim lemp.sh
-
Paste the following code: Lemp.sh
-
Make the script executable:
- ./lemp.sh
- systemctl status nginx mariadb php-fpm
-
Paste the following code: Signup.html
-
Save and exit the file.
-
Paste the following code: Submit.php
-
Save and exit the file.
- mysql -u root -p
- CREATE DATABASE signup;
USE signup;
CREATE TABLE user ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(20), email VARCHAR(100), website VARCHAR(255), comment VARCHAR(100), gender VARCHAR(10) );
- exit
sudo yum install php8.4-mysqlnd.x86_64

- sudo systemctl restart nginx
- sudo systemctl restart mariadb
- sudo systemctl restart php-fpm













