 Let's take a quick look at the Apache log of the accesses and to do that I'll use my browser to access our server several times First to make it a little bit more interesting. I've created a couple extra pages. So remember the The base directory for the website content is under slash VAR slash www slash HTML and the index dot html page there is the default page for Apache I've created a sub directory called test and Inside there. I've got two files index dot HTML, which includes a link to page two dot html And which comes back to index dot html. So that's my website if I go to my client and and Open that website using my web browser links and I'll go direct to the URL as I know the sub directories test and That takes me to the index page Note that I typed in the URL of slash test. I didn't type slash test slash index dot html and It's standard for Apache and most other web servers when you request a directory. I actually request a test forward slash The web server will check if there's a file in there the index file index dot html And if there is it will send back that page Otherwise it may send back a directory listing, but it's normally that if there's an index dot html The web server sends back that Which is what's happened here. It's sent back our index dot html Which just contains a heading a line of text and then go to page two In links I can use my up and down to go between links But unfortunately, there's only one link here the yellow page to to follow that link I can press space or the right arrow And I press the right arrow and I follow the link That triggered my browser to request page two and the server has sent that back and now I see page two and my index Link in yellow is highlighted if I press right key I follow it again, and I request index dot html and it takes me back there So I've accessed the website a couple of times. I can queue to quit in links and Now we'll go to our web server and look at the log and that's in slash var slash log slash apache two and There are three different logs shown here. The one of interest is the access log the error log is when we When Apache starts up or if their errors with the web server that we put in there and hopefully you will not need to To use that but if there are problems with your web server You may look in the error log and the other v-host access dog is used If there are different virtual hosts on the system we want access dog, which is just a text file and I'll open it in via It's a text file where each line Represents an access to the web server every time someone accesses the web server They send a request using HTTP to the web server The web server sends back a response Then one line is put into this log file to the end of the file So we'll inspect one of those lines and we'll look at the last couple of lines the last three in our case There are some of the early accesses. We'll just quit out of that Sorry Quit out of that and I'll just use tail to look at the last three lines of access log They're the ones of interest because I know they're the ones when I use my links web browser on the client to access the web server There are actually three lines here, but because that's so long they are wraparound. So this is the first line This is the second line and The third line corresponding to three accesses to the website Let's go through the first one the IP address of the client that accessed our web server these two are empty fields so they're space-separated fields in this file in this entry and They don't have a value. We will see later one of them is related to it. Well, we won't see in this demo, but If you have logins usernames and passwords the username may be stored there The next is the date and time that that request was received and that's in square brackets here So we know when that request occurred the next and just be careful. It's in enclosed in double quotes This is the next field. This is the summary of the request that came from the client the client said get Slash test slash because if you remember in links, that's what I typed in I Typed in open my browser access using HTTP www.example.com I am my web server and Request the path slash test slash So that's what's sent to the web server and using protocol HTTP version 1.0 The server received that request and sends back a response depending upon whether it was successful or not and HTTP It has a number of status or response status codes and the most common one will see is 200 Okay, when everything is okay another one you may see is 404 not found So this is saying response was okay This is the size of the response the HTTP response response was 428 bytes long This field is empty the dash is the referrer field. We'll see it in the next two examples and This long-glass field is an identifier of the web browser referred to as the user agent Saying the web browser identified itself as links version 2.89 Running with some options SSL glue TLS and so on So this was set by the web browser when it sent the request to the web server So now the server knows something about Who accessed and also what software access what was running what brown browser was running? But noting that a browser could potentially change that if they want to hide that detail So this was a request for slash test slash a Sent a response was sent back to 100 okay, including the web page requested Which we saw was the index.html file because of this feature if you request a Directory normally the index.html file is sent back Then about a minute later. I followed that link to page 2 so we see similar information but a request to slash test slash page 2.html and 200 okay, the page 2 was sent back and Note we have this referrer field set here Where it wasn't set in the first one this field the referrer field indicates If we followed a link to get to page 2 Where do we come from? What page did we come from when we clicked on that link which in this case was the original test URL? So to get to text her page to we came from the original test and In the third case to get back to index.html We clicked on that link to go to index and if you looked in the source code It would be a link to index.html not to slash test slash and The referrer in that case was page 2 The referrer is useful to give statistics to the web server operator about Where did someone come from to get to their website and how do they traverse through the website? for example if someone visited your website via Linking the Google search results the referrer here may be a Reference to Google so you would know that to get to my website They come by Google and that can be useful information for the website operator So a brief summary of the log file the access log file which is maintained by The Apache web server which can provide useful statistics for operating that web server