Setting Up the Web Server

Team-Fly    

Macromedia® DreamWeaver® MX Unleashed
By Matthew Pizzi, Zak Ruvalcaba
Table of Contents
Chapter 17.  Web Application Preparation


This section covers the two most popular Web servers out there: Microsoft's Internet Information Server (IIS) and the Apache Foundation's Apache Web Server.

NOTE

I will also discuss Personal Web Server (PWS) in the IIS section.


Each section includes information on getting the software, as well as installing and configuring it. I also provide easy tests for you to check that the Web server is up and running properly.

Although Web servers can be fairly complex, with many toggles, functions, and configuration options, for our purposes, all we want to do is get them set up and communicating with an application server. This means, realistically, that you'll choose most of the default options when you run through the installs.

NOTE

When you visit some Web server software distribution sites, you'll notice a lot of instructions for the different versions and platforms. You may even get a choice between compilable and executable software. If you are installing a Web server on a Windows-based machine, you'll want to choose an executable package (either EXE, ZIP, or MSI).


Which Server Should I Install?

One Web server is much like another, so which one should you install? It depends on the kind of middleware and database you plan to use.

If you are planning to use ASP (or ASP.NET) along with SQL Server, install Internet Information Server (IIS) or Personal Web Server (PWS). These technologies were all developed by the same company (Microsoft) and generally speaking, are complementary.

If you are planning to develop in a ColdFusion environment, use the built-in Web server that ships with ColdFusion.

If you are going to be using JSP or PHP along with MySQL or Oracle, install Apache.

Internet Information Services/Personal Web Server

The Internet Information Services (IIS) server is Microsoft's Web server. Personal Web Server (PWS) is a lightweight Web server that is easy to install and can be used for testing applications under development.

Before you get started installing these Web servers, check your computer's hard drive because these Web servers sometimes come preinstalled on Windows machines. If you have an \inetpub directory in your C: or D: drives, you don't have to follow these directions.

Which version should you install? It depends on the version of Microsoft Windows your machine is running:

  • Windows 95, Windows 98, and Windows NT Workstation users should install PWS.

  • Windows NT Server, Windows 2000, and Windows XP users should install IIS.

Installing PWS

You can get PWS from the Windows 98 CD-ROM or from the Microsoft site.

If you have a Windows 98 CD-ROM, follow these instructions:

  1. Insert your Windows 98 CD-ROM into your CD-ROM drive.

  2. Click Start, and then click Run.

  3. In the Open box, type the following path to the Setup.exe file, where m is the letter of your CD-ROM drive:

     m:\add-ons\pws\setup.exe  
  4. Click OK.

  5. Follow the instructions in the Setup Wizard.

NOTE

Be sure to accept C:\Inetpub\wwwroot as the Web server's document root.


If you don't have the Windows 98 CD-ROM, you can go to http://www.microsoft.com and do a search on PWS10a.exe, which is the downloadable code package for PWS. After you download it to your desktop, double-click the file's icon and follow the Setup Wizard's instructions.

Installing IIS

To install IIS on Windows 2000 or Windows XP, follow these instructions:

  1. In Windows 2000, choose Start, Settings, Control Panel, Add/Remove Programs.

  2. In Windows XP, choose Start, Control Panel, Add/Remove Programs.

  3. Choose Add/Remove Windows Components.

  4. Select the IIS box and follow the installation instructions.

NOTE

If you have Windows NT Server, IIS should already be installed. Check for a C:\Inetpub or D:\Inetpub directory. If it exists, IIS has been installed.


Confirming Proper Web Server Setup

After you've installed either PWS or IIS, create a simple HTML file in Dreamweaver MX. Type the following HTML code into Dreamweaver:

 <p>My first Web page.  

Save the file as index.html and save it to the \Inetpub\wwwroot directory on either the C: or D: drive.

Then, point your Web browser to http://localhost/index.html. If you see your test page, the Web server was installed properly.

Apache

Setting up Apache on a Windows machine is very simple. To get a copy of Apache, go to http://www.apache.org and choose the latest stable package. At the time of this writing, the stable packages are 2.0.40 (in the 2.0 branch) and 1.3.26 (for the 1.0 branch).

NOTE

Be sure to download the executable version of Apache, not the compilable version.


Either Apache version is a robust, secure application. After you've found the proper package, follow these instructions:

  1. Download the package to your desktop.

  2. Double-click the executable file. This starts the installation wizard.

  3. Read and accept the terms in the license agreement by clicking Next.

  4. On the next screen, enter the following information and click Next:

    • Your machine's network domain (that is, www.yourdomain.com)

    • Your machine's server name (that is, tom.yourdomain.com)

    • The administrator's e-mail address (that is, tom@yourdomain.com)

  5. Select Typical installation and click Next.

  6. Set a home directory for the Web server. Be sure to accept the default setting (C:\Program Files\Apache Group). Click Next.

  7. Click Install to begin the installation.

Figure 17.1. Accept the terms of the Apache License Agreement.

graphics/17fig01.jpg

Figure 17.2. Enter your server's vital statistics.

graphics/17fig02.jpg

Figure 17.3. Select Typical installation.

graphics/17fig03.jpg

Figure 17.4. Accept the default setting for Apache's home.

graphics/17fig04.jpg

Figure 17.5. Click Install to complete the process.

graphics/17fig05.jpg

As soon as you click Install, the Apache installer begins copying files. Various screens will flash open and closed during this process. When the installation process is complete, Apache will display a confirmation page.

Confirming Proper Web Server Setup

You can test to make sure Apache was installed properly by pointing your browser at http://localhost. You should see an Apache placeholder page in the language corresponding to your browser language preference.

TIP

Do you want to see the Apache placeholder page in Spanish? Go to http://localhost/index.html.es. How about in German? Go to http://localhost/index.html.de.


Apache Docroot

The default docroot for Apache 1.x Web servers is

 C:\Program Files\Apache Group\Apache\htdocs.  

The default docroot directory for Apache 2.x Web servers is

 C:\Program Files\Apache Group\Apache2\htdocs.  

Any files you put in the docroot directory (and in any of its subdirectories) can be viewed by visitors to your server.

Working with Apache

On Windows 2000 and Windows XP, Apache runs as a Windows service, which means that it starts up automatically when you turn on your machine and can continue running when you log off.

If you click the Start button and go to Apache HTTP Server, Control Apache Server, you'll see the different commands for controlling the server. You can

  • Start the Apache Web Server.

  • Stop the Apache Web Server.

  • Restart a stopped Apache Web Server.

  • Monitor Apache Servers (this controls error and access logging on your server).

In upcoming pages, as you install a database and middleware, you will learn how to alter Apache's configuration files. These alterations are necessary for the Web server to properly execute JSP, PHP, or other middleware code.


    Team-Fly    
    Top


    Macromedia Dreamweaver MX Unleashed
    Macromedia Dreamweaver MX 2004 Unleashed
    ISBN: 0672326310
    EAN: 2147483647
    Year: 2002
    Pages: 321

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