Designating a Root Folder


Once you have access to a Web server (see Chapter 1), either locally or on a remote computer, you need to designate a root folder for your dynamic site on the computer that runs the Web server and then store your site files in this folder. The root folder is created when the Web server is installed, and as soon as you put a page in the root folder, you can "serve" it from the root folder. Having your site files in a root folder allows you to test your dynamic pages because it enables the Web server to serve any file from this folder in response to an HTTP request from a browser.

Most local Web servers have a default root folder, as shown Table 2.1.

Table 2.1.

Default Root Folders

WEB SERVER

DEFAULT ROOT FOLDER

IIS

Inetpub\wwwroot

ColdFusion MX 7

CFusionMX7\wwwroot

Apache (Windows)

\apache\htdocs

Apache (Mac)

Users: YourUserName:

 

Sites


If you are using a Web server on a remote computer, check with your ISP or Web host for the location of the root folder.

To test your root folder:

1.

Create an HTML page and save it using the name testing.html.

2.

Place the page in your root folder.

3.

Open the test page by entering the URL in a browser.

If you're using a local Web server, you can use localhost instead of a domain name to access your page. For example, to access your test file (testing.html), you would use one of the following URLs, depending on your server type:

  • IIS: http://localhost/testing.html

  • ColdFusion MX 7: http://localhost:8500/testing.html

  • Apache (Windows): http://localhost:80/testing.html

  • Apache (Mac): http://localhost/~YourUserName/testing.html

Tips

  • You can store your site files within the default root folder or create a separate folder within the root folder for your files. For example, if you create a folder named MySite within the wwwroot folder in IIS, the URL for your site is http://localhost/MySite/.

  • If you're using a local Web server, you can use two separate root folders for your site: one root folder on the Web server for testing dynamic pages, and a separate local root folder that contains all the site files, both static and dynamic.

  • If you use a local Web server, the URL and the file path are not the same. For example, if you're using IIS on your computer, the URL for the test page is http://localhost/testing.html, but the file path could be C:\Inetpub\wwwroot\testing.html. If you open the test page in a browser using the file path for the address or browse to the location of the file on your computer, you won't be able to preview and test any dynamic features.

  • The Web server works with the application server to process dynamic content. The application server is usually on the same computer (local or remote) as the Web server.





Macromedia Dreamweaver 8 Advanced for Windows and Macintosh. Visual Quickpro Guide
Macromedia Dreamweaver 8 Advanced for Windows and Macintosh: Visual QuickPro Guide
ISBN: 0321384024
EAN: 2147483647
Year: 2004
Pages: 129
Authors: Lucinda Dykes

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net