0x0D. Web stack debugging #0
Concepts
For this project, we expect you to look at these concepts:
Background Context

The Webstack debugging series will train you in the art of debugging. Computers and software rarely work the way we want (that’s the “fun” part of the job!).
Being able to debug a webstack is essential for a Full-Stack Software Engineer, and it takes practice to be a master of it.
In this debugging series, broken/bugged webstacks will be given to you, the final goal is to come up with a Bash script that once executed, will bring the webstack to a working state. But before writing this Bash script, you should figure out what is going on and fix it manually.
Let’s start with a very simple example. My server must:
have a copy of the
/etc/passwdfile in/tmphave a file named
/tmp/isworkingcontaining the stringOK
Let’s pretend that without these 2 elements, my web application cannot work.
Let’s go through this example and fix the server.
Then my answer file would contain:
Note that as you cannot use interactive software such as emacs or vi in your Bash script, everything needs to be done from the command line (including file edition).
Installing Docker
If you would like to have Docker so that you can experiment with it and/or solve this problem locally, you can install it on your machine, your Ubuntu 14.04 VM, or your Ubuntu 16.04 VM if you upgraded.
Ubuntu 14.04 LTS (Note that Docker for Ubuntu 14 is deprecated and you will have to make some adjustments to the instructions when installing)
More Info
Resources
Requirements
General
Allowed editors:
vi, vim, emacsAll your files will be interpreted on Ubuntu 14.04 LTS
All your files should end with a new line
A
README.mdfile, at the root of the folder of the project, is mandatoryAll your Bash script files must be
executableYour Bash scripts must pass
Shellcheckwithout any errorYour Bash scripts must run without error
The first line of all your Bash scripts should be exactly
#!/usr/bin/env bashThe second line of all your Bash scripts should be a comment explaining what is the script doing
Tasks
0. Give me a page!
Be sure to read the Docker concept page
In this first debugging project, you will need to get Apache to run on the container and to return a page containing Hello Holberton when querying the root of it.
Example:
Here we can see that after starting my Docker container, I curl the port 8080 mapped to the Docker container port 80, it does not return a page but an error message. Note that you might also get the error message curl: (52) Empty reply from server.
After connecting to the container and fixing whatever needed to be fixed (here is your mission), you can see that curling port 80 return a page that contains Hello Holberton. Paste the command(s) you used to fix the issue in your answer file.
Repo
Repo:
GitHub repository:
alx-system_engineering-devopsDirectory:
0x0D-web_stack_debugging_0File:
0-give_me_a_page