Lab Sheet Web Server (LAMP) Latest
Lab Sheet Web Server (LAMP) Latest
Apache is most widely used web server that can be used nowadays.
Step 3: Set up firewall to accept incoming (inbound traffic) for “Apache Full” firewall profile by type
below command:
Step 4: To test apache webserver after update ubuntu firewall, open client browser and enter your Web
Server IP Address like below:
Install MySQL-Server
MySQL Server is Open Source Relationan Database Management System that can be used as our
database.
Step 2: Securing the mysql database installation with secure script from mysql by entering command
below and answer all the question by following given guideline:
Step 4: Enter below command to view authentication method for root access:
Table below is the information fot root authentication access without any password.
Step 5: Enter below command to change authentication method for root access (creat password for root
access ):
Step 6: Enter below command again to view authentication method for root access after setting
password for root access. This step is to allow user access Mysql databases:
Step 2: Enter below command to configure apache webserver setting, to set main priority on index.php
file first instead of index.html and others formats.
Step 3: Edit the opened file by bring forward index.php after index.html like below:
Step 4: Save file after edit by enter ‘CNTRL + X,’ then press Enter.
Step 8: Exit and Save by enter ‘CNTRL + X,’ then press Enter.
Step 9: View info.php in your client browser by enter Server Ip Address/info.php like below.
Install phpMyAdmin
phpMyAdmin is a free software tools that use to handle administration on our databases such mysql-
server, mariadb and etc.
Step 9: Remove the mysql validate password component by using the below command.
Step 10: Install again phpMyAdmin using below command.
Step 12: Now you can access phpMyAdmin web interface by entering your web server ip address
following with /phpMyAdminin your browser URL like below.
Step 13: Login to phpMyAdmin by enter below username & password into Login Area.
Username: root
Password: password123
Step 14: Once successful login, you will redirect log to phpMyAdmin dashboard like below.
Testing Your Web Server:
We already done install LAMP as a web server in our Linux Machine, now we want to test it.
Step 2: Create your site by entering this command and the save it.
Step 4: Step 12: Now you can access your created hellowWorld.php web interface by entering your web
server ip address following with /hellowWorld.php in your browser URL like below.
Setup Apache to do virtual hosting.
You can running several name-based web sites on a single IP address (single server) in Apache web
server and this is we call virtual hosting.
Step 2: Assign ownership of the created folder to specific user by entering below command.
Step 3: Open new configuration file in Apache site-available directory using below command.
Step 6: Disable the default website that comes installed with apache by entering below command.
Step 7: Enter below command to ensure your configuration file doesn’t contain syntax errors.
Step 9: Your new domain website now active, but the web root still empty. Now we want to create
index.html for our web site by entering below command.
Step 10: Configure index.html file like below and save it.
Step 11: Now go to your browser and access your server domain by enter your domain Ip Address like
below:
Install a simple web application to run on the web server.
Reference:
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-
on-ubuntu-20-04
https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-
ubuntu-20-04