Web Service Including Database On AWS
Web Service Including Database On AWS
A web server is software and hardware that uses HTTP (Hypertext Transfer
Protocol) and other protocols to respond to client requests made over the World
Wide Web. The main job of a web server is to display website content through
storing, processing and delivering webpages to users. Besides HTTP, web servers
also support SMTP (Simple Mail Transfer Protocol) and FTP (File Transfer
Protocol), used for email, file transfer and storage.
Commonly used for web server is nginx for linux, apache for linux and window in
linux, Microsoft Internet Information Services (IIS) for window, and Sun Java
System Web Server for linux and window.
Front end website such as html, CSS, java script, don’t need any database to
install in operating system.
Back and front end website such as PHP, Java, we do need to install database to
store data.
Relational datbase such as mysql, postgre, sql server, oracle, maridb, mongo db,
it is stroed databse based on table (row, column)
Object oreinted database : use object or file to store data suchs as XML, Json…
Page 1 of 7
We have 2 options to run back end website such as php or java in linux server we
can install LAMP (php, apache, mysql) server on Linux or we can install mannuly
on linux server such as nginx, mysql, php.
Login to mysql
#mysql
Create username
Page 2 of 7
#GRANT ALL ON *.* TO myadmin@'%' with grant option;
Show users
#vi /etc/mysql/mysql.conf.d/mysqld.cnf
Restart mysql
Import database
Page 3 of 7
Page 4 of 7
2-Install php
or
apt install php7.4-cli
/var/www/web2/
Configure nginx
Vi /etc/nginx/sites-available/default
Page 5 of 7
Configure connection between php and mysql database
Vi /var/www/web2/config.php
Page 6 of 7
Testing web service with php website
Page 7 of 7