Steps:
AWS
putty
ubuntu
sudo su
apt update
apt install apache2
service apache2 start
service apache2 status
you will see a ubuntu on your ip
(/var/www/html/index.html)
cd /var/www/html/
ls
now you see index.html
now remove this index.html file
rm index.html
ls
apt install php
apt install mysql-server
now open filezilla
use ssh
and username ubuntu
password ppk key
upload file (in my case index2.zip) inside ubuntu folder
now move uploaded zip file into /var/www/html/
mv index2.zip /var/www/html/
cd /var/www/html/
ls
you can see your file here
now install unzip
apt install unzip
now unzip your file
unzip index2.zip
now
cd /etc/apache2/sites-available/
ls
now open
nano 000-default.conf
add your directory name if you have then save
now open mysql
mysql h localhost -u root
now change your db password using below query
ALTER USER ‘root’@localhost’ IDENTIFIED BY ‘BasantMallick’;
here BasantMallick is your password
now login with new password in mysql
now
create database frmscui;
use frmscui;
for importing sql file use below command
first exit from mysql
second move into parent or index file directory
and use below command
mysql -h localhost -u root -p yourdatabase > sqlfilename.sql
then again login into database
after login
use databasename
show tables
Note: for editing in file use nano before filename
Method 2:
Aws Cloud – host php mysql website on aws ec2 in hindi | http to https aws | free ssl
— * Used Commands *–
Note: https://help.ubuntu.com/community/FilePermissions
ubuntu@ip-172-31-13-220:~$ sudo chown -R www-data:www-data Netrika/
ubuntu@ip-172-31-13-220:~$ ls -ilah
Just use below code and modified according to your need. Note: this is very useful…