Setting up Your Web Directory

This page will walk you through setting up your web directory. We will create a couple of sub-directories under localhost's home directory and create a simple home page in HTML.

Set Up

  • For Mac users the htdocs directory (/Applications/MAMP/htdocs/) is where your Apache server HOME directory -- i.e., where Apache will look for web pages.
  • For Windows users the \web folder that you created is the Apache HOME directory.
  • Navigate to you Apache Server HOME directory.
  • Create a folder in HOME named cpsc110. We will use that folder to store web pages we create and programs we write.
  • Create a folder in HOME named images. This is where you will store images that you want to include in your web pages.
  • Download the following samplewebpage.html page and save it as index.html in your htdocs directory. This will become your home page. When you click on that link you may have to View Source to get to the HTML code. Save the HTML code as index.html.
  • Open your web page using the URL: http://localhost/.
  • Now use an editor such as TextWrangler (for Mac) or NotePad++ for Windows to customize your home page.
  • Copy a couple of images into your images directory and link them into your home page.