Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project1 directory created in /home/ubuntu/Project1. Need help with script info. 1.Run the command that will stop your Apache2 server 2.Create a file called script4.sh inside

Project1 directory created in /home/ubuntu/Project1. Need help with script info.

1.Run the command that will stop your Apache2 server

2.Create a file called script4.sh inside Project1/ directory

3.Edit the script4.sh file to do the following:

Create a function called webserver

The webserver function should be able to do the following:

Create a file called webstart.log

Start apache2 and send the outputs to webstart.log

Check the status of the apache2 service and add outputs to webstart.log

Navigate to /var/www/html dir

Copy index.html to index.html.copy

Move index.html.copy to /home/ubuntu

Delete the index.html file

Create a new index.html file

Change ownership of index.html to ubuntu

Add the following to index.html Hello World!"

Restart the apache2 service and add outputs to webstart.log

4.When you are finished do the following to verify your function worked:

Display the contents of your index.html file

Via Browser Navigate to your IP address (ask me for your public IP)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David J. Auer David M. Kroenke

13th Edition

B01366W6DS, 978-0133058352

More Books

Students also viewed these Databases questions

Question

What is topology? Explain with examples

Answered: 1 week ago