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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started