HTML5, CSS3, and JavaScript Fourth Edition

(Ben Green) #1

CHAPTER 19. FIRST WEBSITE 206


After logging in, you will see a
menu. It may look something like
this.


19.4.1 Domain Management


If you only have one domain, and you are using an Apache-based webserver,
yourdocument rootwill probably bepublic_html. The document root
is the folder (directory) in which the webpages for that website are stored.
Those files are called thedocument tree.


If you have addon domains or subdomains, each of those will have its own
document root. It is possible for domains to share the same document root.
In that case, each webpage might have an alias.


The webhost keeps a list of all the domains it is hosting, and for each domain
(or subdomain) it knows the document root.


When a webpage request arrives at the server, the server will break the
request into two main parts: the domain name and the path.


Using the domain name, the server will identify the document root.


Using the path, the server will identify the exact file (or CGI program) inside
that document tree.


For example, we may have the following:


Domain name:doncolton.com


Document root:/home/doncolton/public_html


URL:http://doncolton.com/books/iwdd/iwdd.pdf


In this case, the user presents the URL and expects to receive a pdf file in
response. The browser sends the whole URL to the server.

Free download pdf