You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

4.2 Web servers and 2.5KB

Now that you’ve setup XAMPP it’s time to see how it all ties together. Depending on your Operating System you should have the XAMPP control panel system-tray or shortcut someplace.

Once you start the XAMPP control panel you will be greeted with START|STOP|RESTART options for apache, mysql, filezilla, mercury, and tomcat.

We are for now only interested in apache. Now matter what runs by default, ensure that apache is started and is running.

It is, in a way, considered to go without saying that apache will take care of running PHP. These “obvious” (but not obvious at all) things occur seldom but unforunately they still occur.

If all’s green you should be safe to open up a web browser and enter http://localhost in the address bar then press ENTER (navigate to localhost), and the default XAMPP splash-screen-page-thing should load.

So to combine all previous notes in these documents, let’s summarize what happened:

  1. you opened your browser by instructing your operating system to execute the browser binary program “mozilla firefox” (or “google chrome” (or “internet explorer” (you get the picture)))
  2. the browser binary program has rendered its interface to your screen
  3. you entered the “http://localhost” text string into the address bar and pressed ENTER
  4. the browser binary program acknowledged the instruction and sent an HTTP request to the HTTP server located at http://localhost (our apache installation in this case)
  5. the HTTP server picked up on this request while listening for HTTP requests, and resolved it to load the (default built-in) index.html file it comes packaged with
  6. the HTTP server loads the content of the index.html file into its memory, then gives it to the browser as an HTTP response
  7. The browser turns the HTTP response (in our case HTML) then based on the HTML structure, displays the index.html document within its interface

Now is the part when filesystems and pathnames come into play, see point #5, the HTTP server resolves a request to http://localhost as a request to respond with index.html. What is this index.html and where did XAMPP programmers put it?

Depending on your OS it will be either C:\xampp\htdoc\index.html, /var/www/html/index.html, or a path similar to these. It is a sample document and you can open and edit the text or content within, reload the page in your browser and the changes will be there.


Because on each reload the browser sends an HTTP request to the HTTP server which resolves to give the content of that index.html in an HTTP response.

Next up: URIs.