19/100 Install and Configure Web Application
xFusionCorp Industries is planning to host two static websites on their infra in Stratos Datacenter
. The development of these websites is still in-progress, but we want to get the servers ready. Please perform the following steps to accomplish the task:
1. Install httpd
package and dependencies on app server 3
.
2. Apache should serve on port 3002
.
3. There are two website's backups /home/thor/blog
and /home/thor/demo
on jump_host
. Set them up on Apache in a way that blog
should work on the link http://localhost:3002/blog/
and demo
should work on link http://localhost:3002/demo/
on the mentioned app server.
4. Once configured you should be able to access the website using curl
command on the respective app server, i.e curl http://localhost:3002/blog/
and curl http://localhost:3002/demo/
ssh banner@stapp03
sudo su -
dnf install httpd -y
vi /etc/httpd/conf/httpd.conf
Listen 3002 <- Change to this value
esc
:wq
exit <- return to banner user from sudo
mkdir /tmp/demo
mkdir /tmp/blog
#From jump host
scp /home/thor/demo/index.html banner@stapp03:/tmp/demo
scp /home/thor/blog/index.html banner@stapp03:/tmp/blog
#Back on stapp03
mkdir /var/www/html/blog
cd /tmp/blog
sudo mv index.html /var/www/html/blog
mkdir /var/www/html/demo
cd /tmp/demo
sudo mv index.html /var/www/html/demo
curl http://localhost:3002/blog/
<h1>KodeKloud</h1>
<p>This is a sample page for our blog website</p>
curl http://localhost:3002/demo/
<h1>KodeKloud</h1>
<p>This is a sample page for our demo website</p>