Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!