Locating the "web root"

 

Roots

The term "root" is used to denote a "base" or "starting point." There are basically three kinds of "roots":

Server (or system) root
The "server" or "system" root is a reference to the main hard drive that contains all the files for the server. This is synonymous in the Windows world to the "C" drive -- or -- C:\\

Account root
Account root refers to the directory that contains ALL the files related to your acount, including emails, logs and other important account information.

Web root
This refers to the directory that contains all the files that make up your actual web site. (aka the "public_html" folder.

Now, the tricky thing here is how a web server "points" to your web root.

There is often confusion on how a web address (URL) "knows" where all the files are located.

In other words, when you enter "http://www.yoursite.com" into a web browser, how on earth does the browser know how to display my files!

In a nut shell... When a web server receives a request for your domain name, it references a database to determine which account is related to the domain name. (This is a simplified explanation of the DNS system.)

It then directs the web browser to the Web Root directory of the associated account. (i.e. the "public_html" folder.

The best way to determine that you've located the "web root" is to create a simple text file and upload the newly created text file to the web root directory. Then using a web browser (such as Internet Explorer), enter the URL to the text file.

For example, create a new text file and name it "test.txt" and type something into the text file, such as "hello world." Then upload it to the web root. Then using a web browser, enter:

http://www.yoursite.com/test.txt

If "hello world" appears in the browser, then you know that you've successfully located the "web root."

A little deeper down the rabbit hole

The server that your web site is "on" probably contains 30 or 40 other web sites as well. While some web sites have their very own machine (dedicated server), this is not usually the case, since only very large, high volume web sites require a dedicated server.

Since a single web server may have a number of different web sites running on it, the web server needs to keep things organized.

When you sign up for a "hosting account" with a "hosting provider," such as Lunar Pages, Blue Host, Go Dady, etc., the company will set up a new folder for you on one of their machines.

This new folder is your Account Root. For example, a typical server will have a number of separate folders, one for each user.

Example

/www/home/accountA
/www/home/accountB
/www/home/accountC

Each Account Root contains sub-folders that contain different kinds of information about the account, such as email, logs, configuration settings, and web site files.

For example, here's how a typical account's directory structure would appear:

/www/home/accountA/user_email
/www/home/accountA/public_html
/www/home/accountA/web_logs

When you log in via FTP, you are automatically redirected to your Account Root. As such, you will see all of the stuff in your Account Root. For example, when you log in you can expect to see something like:

user_email
public_html
web_logs
(... and probably many other folders and files)

Generally speaking, a web server uses a directory called "public_html" as the place where the actual web site files are located -- it is your website's root folder -- aka the WEB ROOT.

The actual name of this folder may vary. Some other common names are "www" or "html" or "public."

This "public_html" folder is a special folder. Anything inside this folder can be viewed by anyone on the internet. The web root is where all the files that make up your web site must be located.

There is a divide between the Web Root and the Account Root. The Web Root is public (anyone on the internet can "see" anything in the Web Root), but the Account Root is protected and off limits to anyone on the internet. Stuff located inside the Web Root is not allowed to access anything inside the Account Root.

Wimpy can not access any media files located in the Account Root. It can only access files located somewhere in the Web Root.

So when creating the Wimpy Installation Folder, you'll need to create it inside the web root folder.

Index or Default HTML files

Inside the web root you should see a file named "index.html". The index.html file is a kind of magic file that automatically get's displayed when it is present within a folder.

Sometimes this file is named "default.html" or "default.htm" (no L)

In other words, it is the default file the the web server displays when you access a folder.   For example, if you create an empty new folder on your web site as:

http://www.yoursite.com/newFolder

... then navigate to that folde with a web browser, you will see a pretty ugly page showing a bunch of stats, or list of files, or error or warning messages.

If you upload a file named "index.html" to that folder, you will no longer see the ugly stats page, but in turn you will be presented with the index.html file.

So the web server "knows" that if a person navigates to a folder (and not a file), it should display the index.html file if it exists. If the index.html file does not exist, then the server will display statistics about the folder, which may include displaying a list of files and folders, or error or warning messages -- depending on how the server is configured..

Now, since "public_html" is just a folder, the same rules apply... The web server will display the"index.html" file because it exists.

The index.html file located within the web root is often refered to as your "home page."

So when a person navigates to your website:

http://www.yoursite.com/

... the web server will present the index.html file if it exists. Otherwise, the server will display the contents of the folder.