In this lesson, you will:
✶ Look up your IP address
✶ Type that address into your web browser
✶ Go to a directory in /root
✶ Check for a file
✶ Give yourself permission to access a directory
✶ Delete the Apache default page.
If you do not have a Linux environment set up,
visit: Setting up LAMP Lessons
To find your IP Address, type:
$ ifconfig
➼ ifconfig
Interface Configuration - Look up network info, including the IP address
(more on this in Intro to Linux)
Your IP address will be displayed like in the picture below.
If there are multiple IP addresses, write them all down. You can go through to see which one works.
Type the IP address, like you would type a regular web address. What do you see? Look at the 3 options below.
If this is what you see, then it works! Look at the default page. It should say to delete this page at /var/www/html/index.html. Go to step 3.
If you see something like the picture above, then your Apache default page is already deleted. You should still go on to step 3 and make sure you can go to that directory and add files.
If nothing loads, here are some trouble shooting tips
1) Did you try all the IP addresses?
2) Did you type every IP address correctly?
3) Watch my video tutorial (Delete the Apache Default Page). There
is a quick setting fix in that tutorial that usually fixes it. Essentially
you will power off your Ubuntu disk image, go into setting, click on Network,
change 'attached to' to 'bridged adapter'.
$ cd /var/www/html
➼ cd
Change directory
➼ /
Go back to the root directory.
➼ var
is a directory in the root directory.
➼ www
is a directory in var.
➼ html
is a directory in www. html is the directory that contains the default page,
index.html, that we have to delete.
Use the list command to check for index.html
$ ls
You should see a file called index.html listed.
Now you must give yourself permission to the html direcotry. You will do so by typing the
following command:
$ sudo chown -R `whoami` /var/www/html
➼ sudo
Used for administrative tasks
➼ chown
Change Owner - used to change the owner of a directory.
➼ -R
Recursive - You will have access to all the sudirectories and files inside of
/var/www/html
➼ `whoami`
Will write your username into the command
➼ /var/www/html
This is the directory we want access to.
Since you already cd'ed into /var/www/html, you could also type this:
$ sudo chown -R `whoami` pwd
➼ sudo
Used for administrative tasks
➼ chown
Change Owner - used to change the owner of a directory.
➼ -R
Recursive - You will have access to all the sudirectories and files inside of
/var/www/html
➼ `whoami`
Will write your username into the command
➼ pwd
Print Working Directory - It will insert the name of your current directory
into the command.
Type the following Command:
$ rm index.html
➼ rm
Delete
➼ index.html
File we want to delete
Once you start creating files and projects, you will see them listed on this page.