Setting Up the Server-Side Components for CWP

 <  Day Day Up  >  

Setting Up the Server-Side Components for CWP

Three distinct server-side components make up the CWP "publishing chain." Requests for FileMaker data via CWP come first to a Web server ”either Apache (on Mac OS X) or Internet Information Server (on Windows). The Web server then routes that request to a Web Publishing Engine, a standalone server process that sits in between the Web server and FileMaker Server. The Web Publishing Engine processes the Web request, makes the appropriate call to a copy of FileMaker Server Advanced, and formats the returned data into XML, which it then sends back to the client via the Web server.

In theory, all three server-side components (Web server, Web Publishing Engine, and FileMaker Server), can be run on the same machine. In practice, this is not a good idea. We recommend that you use at least two machines for your CWP setup: one for the Web server and another for FileMaker Server. The Web Publishing Engine can be installed on either of those two machines. If you want, you can spread the deployment across three machines, and have the Web Publishing Engine sit on its own machine in the middle. We see the biggest gain in moving from a one-machine setup to either of the two-machine configurations.

graphics/troubleshooting_icon.jpg

If you have any firewalls anywhere in your network architecture, be aware of this: If any of the machines in your Custom Web Publishing setup are separated from the others by a firewall, certain ports in that firewall may need to be open . See "Dealing with Firewalls" in the Troubleshooting section at the end of this chapter.


Installing the Web Publishing Engine

We're going to assume that you already have a Web server running (Apache and IIS, again, are the only choices here), and a working installation of FileMaker Server. You'll also need to have access to the FileMaker Server Web publishing components, either by having purchased a full version of FileMaker Server Advanced, or by having purchased the FileMaker Server Advanced Option Pack to add Web publishing capabilities to an existing installation of FileMaker Server.

NOTE

If you're adding Web publishing capabilities to an existing FileMaker Server, you need to update the license key for that server installation. You do this via the Server Administration Tool.


For more information on the Server Administration tool, see "Configuring and Administering FileMaker Server Using the SAT," p. 746 .


There are actually two separate items to install: The Web server plugin and WPE administrative console constitute one piece and the WPE itself the other. Unless you're installing the WPE on a machine different from the Web server, you can install all these components at once, on the same machine. If the Web server and WPE are on different machines, you need to install the Web server module and the admin console on the Web server machine, and then install the WPE on whichever other machine you've designated for that purpose. Figure 23.3 shows how these components work together.

Figure 23.3. FileMaker's Custom Web Publishing consists of a number of server-side components. The Web Publishing Engine may or may not be installed on the same machine as your Web server.
graphics/23fig03.gif

The Web server module is an add-on to your Web server (Apache or IIS) that allows the Web server to communicate with the Web Publishing Engine. The Administration Console is a Web-based application, installed on the same machine as the Web server, that allows you to configure and control a WPE via a Web browser.

NOTE

For best results, shut down your Web server processes (not the server machine itself, but the Web server processes) before installing the Web server module and admin console.


NOTE

The WPE, if you're curious , is based on Tomcat, a popular open-source Web application platform based on Java servlets, and the Web server module (different for each server) enables the Web server to communicate directly with a Tomcat installation.


Configuring the Web Publishing Engine

The Web Publishing Engine is configured via the Administration Console, which is a Web-based application that gets installed when you install the Web server module on the Web server of your choice. After you've completed that install, and you've also installed a Web Publishing Engine (either on the same machine as the Web server or elsewhere), you can configure the Web Publishing Engine by opening a browser and pointing it to http://<server-ip>/fmi/config/ .

Setting Up Authentication

When doing this for the first time, you'll be prompted to configure administrative access to the Console, via a screen like the one shown in Figure 23.4.

Figure 23.4. You'll need to configure the Administration Console with a username and password when you access it for the first time.
graphics/23fig04.gif

When this is done, you'll be prompted for the IP address of the Web Publishing Engine, as shown in Figure 23.5. (If the Web Publishing Engine is on the same machine as the Web server, just enter the word localhost .)

Figure 23.5. You need to specify the address of the machine on which your Web Publishing Engine is located.
graphics/23fig05.gif

The third step is to configure authentication for the Publishing Engine. This authentication is separate from the administrative access you configured in step one. The screen is shown in Figure 23.6.

Figure 23.6. You need to set a username and password that are specific to one Publishing Engine.
graphics/23fig06.gif

At this point, you should see an Overview screen like the one in Figure 23.7. In this shot we see a setup with the Web server and the Web Publishing Engine on a single machine. The WPE has been fully configured here for all three kinds of access: Instant Web Publishing, XML, and XSLT. (You'll see shortly how to do this.) In this image, the connection to FileMaker Server hasn't yet been configured.

Figure 23.7. The overview screen provides a look at all installed components of the Custom Web Publishing chain.
graphics/23fig07.jpg

Configuring Different Types of Access to the Web Publishing Engine

You need to configure the Web Publishing Engine for each different type of Web access you want to support. The Publishing Engine tab of the Administration Console has four sub-tabs, one for General Settings and three more for the three flavors of Web access. Chapter 21 discusses how to configure the Web Publishing Engine for Instant Web Publishing.

For more information on configuring the WPE for Instant Web Publishing, see "Configuring FileMaker Server 7 Advanced for IWP," p. 613 .


The configuration screen for XML access is so simple we won't show it here. It consists of a single radio button that turns XML access on or off. If XML access is off it isn't possible to serve XML data from the Web Publishing Engine, regardless of any privileges the attempting user may have.

The same is true for XSLT access. The configuration screen for XSLT-CWP is more complex and is shown in Figure 23.8

Figure 23.8. You might need to consider many options when configuring the Web Publishing Engine for XSLT access.
graphics/23fig08.jpg

This screen, of course, allows you to enable or disable XSLT publishing. As with XML and IWP publishing, you can globally disable the publication of data via XSLT from the Web Publishing Engine.

Next , you can choose between "development" and "production" modes. In development mode, the Web Publishing Engine returns HTML screens with detailed error messages, including a specific error number and the exact position in the XSL stylesheet that generated the error (if known). In production mode, your users don't see these formidable messages, but instead see a friendlier, more generic message.

Next, you can enable "stylesheet caching." This option is available only in Production mode. It causes the Web Publishing Engine to store stylesheets in memory after they're initially accessed, which speeds up repeated uses of the stylesheet. You can also set the cache's maximum size. We recommend enabling this option whenever you go to Production mode (unless you feel strapped for RAM, in which case you probably need a beefier server for the Web Publishing Engine anyway). We recommend setting the cache to the maximum size necessary for the solutions you'll serve, but no larger. The Small option covers up to 25 stylesheets, Medium covers 25 “100 stylesheets, and Large is for more than 100.

TIP

During development and debugging, you should turn stylesheet caching off. With caching turned on, any changes you make to your stylesheets won't be reflected until the cached copy expires .


Your next choice is whether or not to use database sessions. This is a complex concept that is covered more fully later in this chapter, in the section titled "About Sessions."

Next, you can specify a mail server that will be used for any emails you send from your stylesheets. FileMaker's Custom Web Publishing offers you the capability to have your Web application send emails. If you create such a Web application, this area is where you'd specify the parameters of the SMTP server you're using for outbound mail.

Last, you have the opportunity to set the default text encoding for stylesheets and emails. Text encoding is a large topic that we don't cover fully in this book. The FileMaker defaults are generally adequate for an American or Western European environment. If you're working in an Asian environment you may need to change these settings.

Configuring the Connection with FileMaker Server

The Web Publishing Engine and FileMaker Server now need to be made aware of each other. There's work to be done on both sides. In the Administration Console, you need to specify the IP address of the FileMaker server. You also need to give your Web Publishing Engine an identifier and an optional passcode . The Web Publishing Engine uses these two keys to identify itself when it makes requests to FileMaker Server.

FileMaker Server, in turn, needs to be configured to accept requests from a specific Publishing Engine. To do this, you need to open the Server Administration Tool and connect to the relevant FileMaker Server.

For more information on the Server Administration tool, see "Configuring and Administering FileMaker Server Using the SAT," p. 746 .


Of course, you need to have FileMaker Server set up to allow some number of Web Publishing Engine sessions. The relevant dialog from the Server Admin Tool is shown in Figure 23.9.

Figure 23.9. FileMaker Server also needs to be configured to accept connections from a specific Web Publishing Engine.

graphics/23fig09.gif


Additionally, after you click the Enable Client Services button, you have two more options. The first allows you to enable ODBC/JDBC connections to the Server, but the second is what we're interested in here. You can configure FileMaker Server to be aware of more than one Publishing Engine. Figure 23.10 shows a copy of Server that's been configured to know about two different Publishing Engines.

Figure 23.10. FileMaker Server can be aware of several Publishing Engines at once, though it can accept connections from only one at a time.

graphics/23fig10.gif


For more information on ODBC/JDBC connectivity, see "Accessing FileMaker Data Using ODBC/JDBC," p. 578 .


Notice that we don't say "work with" two different Engines. Only one of the Engines can be checked at a time, and this is the only Engine from which that copy of Server will accept connections (based on the identifier and optional passcode).

After you enable the connection to the Server from both sides, you should be able to access the FileMaker Server tab in the Administration Console. Then go to the Published Databases subtab and see a list of all databases on the chosen Server that are enabled for some form of Web publishing, as shown in Figure 23.11.

Figure 23.11. The Administration Console lets you see at a glance which databases are enabled for Custom Web Publishing.
graphics/23fig11.jpg

Saving Your Changes

As you move through the Administration Console, remember to press the Commit button where necessary to save your changes. (Somewhat confusingly, not all screens have a Commit button. In some cases your entries are saved when you press Continue.)

Certain changes require you to restart the Publishing Engine. If a screen requires this, you have a Restart Publishing Engine button available at the lower right. Additionally, some changes require that you restart the entire Web server. If this is the case, a red message to this effect appears at the lower left of the window.

 <  Day Day Up  >  


QUE CORPORATION - Using Filemaker pro X
QUE CORPORATION - Using Filemaker pro X
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 494

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