• No results found

AS/400e. TCP/IP Services and Applications Webserver(HTTP)

N/A
N/A
Protected

Academic year: 2021

Share "AS/400e. TCP/IP Services and Applications Webserver(HTTP)"

Copied!
108
0
0

Loading.... (view fulltext now)

Full text

(1)

AS/400e

TCP/IP Services and Applications

Web server (HTTP)

(2)
(3)

AS/400e

TCP/IP Services and Applications

Web server (HTTP)

(4)
(5)

Contents

Part 1. Web server (HTTP) . . . 1

Chapter 1. What’s new for V4R5 . . . . 3

Chapter 2. Print this topic . . . 5

Chapter 3. Web Server software

requirements

. . . 7

Chapter 4. Web Server hardware

requirements

. . . 9

Chapter 5. Other Web Server

requirements . . . 11

Chapter 6. Getting started with HTTP

Server . . . 13

Verifying your server installation . . . 13

Using your administration (ADMIN) server . . . 14

Starting your administration (ADMIN) server . . 14

Viewing your AS/400 Tasks page . . . 15

Viewing your server’s front page . . . 16

Using the Configuration and Administration forms . . . 16

Changing ports for the administration (ADMIN) server . . . 17

Starting and stopping your server . . . 18

Creating a home page . . . 18

Creating a home page in a library . . . 19

Chapter 7. Supporting multiple Web

sites on the HTTP Server . . . 21

Creating a server instance . . . 22

Deleting a server instance . . . 22

Changing server instance parameters . . . 23

Changing associated configurations . . . 23

Working with server instances . . . 24

Chapter 8. Storing and serving Web

pages . . . 25

Working with Welcome directives and Pass directives . . . 26

Serving Web pages from the root (or /) file system 27 Serving Web pages from the QOpenSys file system 28 Serving Web pages from the QSYS.LIB file system 29 Serving Web pages from the QDLS file system . . 30

Serving Web pages from the QOPT file system . . 31

Serving Web pages from the UDFS file system. . . 32

Testing your URL routing. . . 34

Chapter 9. IBM HTTP Server

administration

. . . 35

Configuring HTTP Server . . . 35

Creating a configuration . . . 35

Deleting a configuration . . . 36

Displaying a configuration . . . 36

Controlling requests for your server resources . . . 37

Customizing your server request processing . . 37

Enabling and disabling methods . . . 37

Mapping requests to your server resources . . . 38

Improving server performance . . . 39

Changing TCP/IP configuration . . . 39

Customizing local cache . . . 39

Changing HTTP Server performance settings . . 39

Customizing error messages . . . 41

Configuring directory listings and welcome pages 41 Defining welcome pages . . . 42

Using icons in directory listings . . . 42

Using directory listings . . . 42

Displaying READ.ME text . . . 43

Configuring user directories . . . 43

Defining file extensions for multiformat processing 43 Making file extensions case-sensitive . . . 44

Tailoring pages to browser capabilities . . . . 44

Associating file extensions with MIME types . . 44

Associating file extensions with MIME encodings 45 Associating file types with languages . . . 45

Chapter 10. IBM HTTP Server security

47

Managing Internet users . . . 47

Adding an Internet user . . . 48

Deleting an Internet user . . . 48

Changing Internet user passwords. . . 48

Listing your Internet users . . . 49

Protecting resources . . . 49

Working with document protection . . . 50

Creating protection setups . . . 50

Deleting protection setups . . . 51

Changing protection setups . . . 51

Creating access control lists . . . 52

Securing communications between users and Web sites . . . 52

Configuring your server for secure serving . . . 52

Using SSL with your server . . . 53

Storing and querying information with LDAP . . . 53

Using LDAP with configuration information . . 53

Creating an LDAP server setup. . . 54

Changing an LDAP server setup . . . 54

Deleting an LDAP server setup . . . 54

Securing your server against a telnet denial-of-service attack . . . 55

Chapter 11. Monitoring your server

activity. . . 57

Working with logs . . . 57

Configuring your global log file settings . . . . 58

Configuring your access log file . . . 59

(6)

Configuring your error log file . . . 59

Creating your extended log format . . . 60

Changing your extended log format . . . 60

Deleting your extended log format . . . 61

Working with reports . . . 61

Configuring your basic access reports . . . . 61

Configuring your global report settings . . . . 62

Configuring your Web usage mining access reports . . . 63

Creating a report template . . . 64

Changing a report template . . . 64

Deleting a report template . . . 64

Using the Web activity monitor. . . 65

Working with your server’s SNMP subagent . . . 65

Chapter 12. Setting up your IBM HTTP

Server as a proxy . . . 67

Configuring your server’s proxy functions and SSL tunneling . . . 67

Configuring your proxy server’s basic cache settings 68 Designating a port number for your proxy server . 68 Configuring a hierarchy of proxy servers . . . . 68

Configuring advanced caching functions . . . . 69

Working with caching filters . . . 69

Configuring cached file expiration . . . 69

Setting a time limit for cached files . . . 70

Working with other caching time limits . . . . 70

Specifying which clients can use the proxy . . . . 70

Chapter 13. Rating Web sites and

serving rated Web information . . . . 73

Setting up a PICS rating service and a PICS label bureau . . . 74

Maintaining your PICS rating service and label bureau . . . 75

Creating a PICS label . . . 75

Registering third-party rating services . . . 76

Requesting PICS label information. . . 77

Managing PICS labels . . . 77

Managing PICS labels for your Web site in each document . . . 78

Managing PICS labels for your Web site from a central file . . . 79

Chapter 14. Dynamic Web page content

and Web applications . . . 81

Configuring your CGI settings . . . 81

Configuring your environment variables. . . 82

Configuring persistent CGI . . . 82

Using server-side includes . . . 83

Chapter 15. Setting up your Webserver

search engine. . . 85

Creating a search index . . . 87

Updating a search index . . . 88

Merging a search index . . . 88

Deleting a search index . . . 89

Displaying index information . . . 89

Testing a search index . . . 89

Use the search engine . . . 90

Chapter 16. Other information about

HTTP Server . . . 93

IBM HTTP Server concepts . . . 94

Agent log . . . 94

Application Server Manager . . . 94

Caching . . . 94 CGI . . . 95 GIF . . . 95 HTML . . . 95 Image map . . . 96 Internet users. . . 96 IP address . . . 96 JPEG . . . 96

Logs and reports . . . 96

Web server methods . . . 96

MIME . . . 98 Net.Data . . . 98 Proxy server . . . 98 Referrer log . . . 98 Server configuration . . . 99 Server instance . . . 99 SSL. . . 100 TCP/IP . . . 100 Validation list . . . 100 Virtual host . . . 100

(7)

Part 1. Web server (HTTP)

The IBM HTTP Server for AS/400 is an implementation of IBM’s cross platform Web server. With IBM HTTP Server you can serve multimedia objects, such as hypertext markup language (HTML) documents, to World Wide Web browser clients with your AS/400 system. In addition, this product is fully HTTP 1.1 compliant.

You can use the server to create and manage Web sites for the Internet, intranets, or extranets. The following pages provide more in-depth information regarding the features and functionality of HTTP Server..

v Getting started with HTTP Server.

v Supporting multiple Web sites on the HTTP Server. v Storing and serving Web pages the HTTP Server. v Administrating the HTTP Server.

v Securing the HTTP Server.

v Monitoring the HTTP Server activity. v Setting up the HTTP Server as a proxy.

v Rating Web sites and serving rated Web information. v Using dynamic Web page content and Web applications. v Setting up your Webserver search engine.

Make sure that you meet the software, hardware, other requirements for using your Web server.

Additional resources are also available.

(8)
(9)

Chapter 1. What’s new for V4R5

The Search Administration forms contain new enhancements. These enhancements allow searches for information that is contained within META tags and TITLE tags on HTML documents:

v The Create index form has additional fields that allow you to specify fields from TITLE tags, as well as those typically found in META tag fields.

v The simple and advanced Search forms now allow you to specify fields that are associated with the index being searched.

v Radio buttons have been added on Build a document list to allow the request to be processed either as an immediate or background task.

v A new Delete document list form allows you to delete a document list.

v A new View status of document list form allows you to view information about a document list.

v A new Configure HTTP Search (CFGHTTPSCH) command allows you to perform all indexing functions from a command line or from a batch job. The Request processing heading under the configuration section of the forms, contains a new feature:

v A new Test URL routing form shows how a URL matches and transforms according to various routing directives. From this form the Webmaster can see exactly how the directives affect the incoming URLs and more easily develop proper routing directives for his installation.

(10)
(11)

Chapter 2. Print this topic

You can view or download a PDF version of this document for viewing or

printing. You must have Adobe®Acrobat®Reader installed to view PDF files. You can download a copy from Adobe home page.

To view or download the PDF version, select Web server (HTTP) (about 572 KB or 104 pages).

v If you have more than one PDF, list the PDFs in a list (create a separate bullet for each PDF) instead of a paragraph.

v If you need to describe the content, then do so with an embedded list and short, descriptive list items. See the AS/400 Toolbox for Java V4R4 topic for ideas. To save a PDF on your workstation for viewing or printing:

1. Open the PDF in your browser (click the link above).

2. In the menu of your browser, click File.

3. Click Save As...

4. Navigate to the directory in which you would like to save the PDF.

5. Click Save.

(12)
(13)

Chapter 3. Web Server software requirements

Use the GO LICPGM command to check for the installation of these licensed programs. Running your Web server requires that you have the following software installed:

v OS/400 Version 4 Release 4 (5769–SS1) v IBM HTTP Server (5679–DG1)

v Your system requires one of the following IBM Cryptographic Access provider products if you plan to use secure sockets layer (SSL).

– Crypto Access Provider 40–bit for AS/400 (5769–AC1) – Crypto Access Provider 56–bit for AS/400 (5769–AC2) – Cryptographic Access Provider 128–bit (5769–AC3)

v Application Development ToolSet/400 (5769–PW1) is optional but preferred for creating your own home page on your AS/400.

v To use the Configuration and Administration forms you need a Web browser that supports the HTTP 1.0 or 1.1 protocol, frames, and Java Script. Browsers such as Netscape Navigator 3.0, Microsoft Internet Explorer 4.0, and NC Navigator will work with the Configuration and Administration forms browser interface.

v In order to view the log reports generated by the HTTP Server, you must use a browser which supports JVM 1.1.5 or later (for instance, Netscape Navigator 4.05).

v In order to provide the required support for handling digital server certificates, used by SSL for secure Web serving, the Web server also requires″OS/400 -Digital Certificate Manager″ (5769-SS1, option 34).

(14)
(15)

Chapter 4. Web Server hardware requirements

To run the Web server the following hardware is required: v Any AS/400 model that supports OS/400 V4R1 or later.

v Any communication hardware adapter that is supported by the TCP/IP protocol stack.

(16)
(17)

Chapter 5. Other Web Server requirements

Java servlet support requirements.

Servlets are ordinary Java programs that use additional packages (and the associated classes and methods) that are found in the Java servlet API. Running Java servlets is optional. Should you decide to implement them, you will also need:

v The IBM AS/400 Developer Kit for Java (5769–JV1)

v The IBM WebSphere Application server for AS/400 (5769–AS1)

You have a servlet load automatically when the Web server starts, or when the first client requests the services of the servlet. Once loaded, servlets stay running, waiting for additional client requests.

Servlets extend the capabilities of the Web server by creating a framework for providing requests, and/or response services, over the Web. A client sends a request to the server. The server sends the request information to the servlet. The servlet then constructs a response that the server sends back to the client.

Because it is a Java program, the servlet can use all the capabilities of the Java language in constructing a response. It is also possible for servlets to interact with outside resources to construct a response. These resources could include files, databases, or other applications that are written in Java or other languages. The response to the client, therefore, can be a dynamic and unique response to the particular interaction rather than an existing HTML page.

Special AS/400 authorities.

Using the Configuration and the Administration forms requires a valid AS/400 user profile and password. You must have the following authorities to perform configuration and administration tasks: Your user profile must have *IOSYSCFG authority.

v QUSRSYS *LIB: *CHANGE

Note: Do not use QSECOFR as this type of user profile will not work with the HTTP Server.

You must also have authority to the following files and commands: v QUSRSYS/QATMHTTPC: *ALL v QUSRSYS/QATMHTTPA: *ALL v QUSRSYS/QATMHINSTA: *ALL v QUSRSYS/QATMHINSTC: *ALL v CRTVLDL *CMD *USE v STRTCPSVR *CMD *USE v ENDTCPSVR *CMD *USE

Authorizing users to view generated reports.

(18)

All reports that are generated by the server are stored in the following IFS path:

/QIBM/UserData/HTTPSVR/reports/'configname'/

’Configname’ is the name of the server configuration file where the log reporting is enabled. The reports for each configuration are stored in separate directories. You can now authorize users to access only those reports that they require. These directories are created when the first reports are generated for a particular configuration.

By default only the server’s userid has access to read and write reports in this set of IFS directories. You can assign users, who wish to view all reports for all configurations, *RX access to the

/QIBM/UserData/HTTPSVR/reports/

directory. If you do this before the system generates any reports, the user

automatically gets the appropriate authority to the subdirectories and files below. You may want to give users access to the first reports generated for a

configuration. You can do this by giving user profile *RX to the ’configname’ subdirectory and all the report files in that directory. Once the profile has *RX on the ’configname’ subdirectory, they automatically get read access to subsequent reports that are generated in that directory.

(19)

Chapter 6. Getting started with HTTP Server

Before you can use or configure the IBM HTTP Server, you must perform the following activities:

1. Start TCP/IP. If you have verified the installation of your Web server and started TCP/IP, you can start your Web server. If you have started your administration (ADMIN) server, you can configure your Web server.

2. Verify your TCP/IP connections

3. Verify your Web server installation

4. Work with your administration (ADMIN) server You can then do the following:

1. Start your Web server.

2. Create your own configuration.

3. Creating a home page.

4. Configure the server to serve your home page.

5. Create your own server instance using your configuration.

6. Start your server instance.

7. Test your home page. You can do this by going to your browser and serving up your home page.

8. Work with your Web server security.

If you feel that you are ready to have fun with your Web pages, take a look at dynamic Web content and Web applications.

Verifying your server installation

You must have the IBM HTTP Server installed with TCP/IP started with an active connection before you can use it. Before you check for your Web server, you need to have a connection to AS/400.

Complete the following steps to see if your AS/400 has the Web server installed:

1. Start Operations Navigator.

2. Double-click the icon for your AS/400 server.

3. Double-click Network.

4. Double-click Internet.

If the IBM HTTP Server icon appears, your AS/400 has the Web server installed. If the IBM HTTP Server icon does not appear, your AS/400 does not have the Web server installed. See the Software Installation Guide for help with AS/400 licensed program installation. You must have Internet access to view the book. You can now start your Web server. To configure your server, you must also start your administration (ADMIN) server.

(20)

Using your administration (ADMIN) server

Installation of your server includes an administration server instance that is named ″ADMIN.″ Starting the ADMIN server instance allows you to configure certain AS/400 products from a browser, including IBM HTTP Server. You must have the browser requirements and special AS/400 authorities to perform configuration and administration tasks.

You must have your TCP/IP connection up, and TCP/IP must be started in order to run your ADMIN server instance.

Starting the ADMIN server instance will allow you to perform these tasks: v View your AS/400 Tasks page.

v View your server’s Front page.

v Use the Configuration and Administration forms.

If you choose not to use the default port, you may change the ADMIN server port.

Changing the language in which Web pages are presented.

The language the server uses to present Web pages for the ADMIN server is based on the user ID with which you signed on and the languages installed on your AS/400 system. If necessary, you can use the Change User Profile (CHGUSRPRF) CL command to change the language identifier parameter of your user profile (the LANGID parameter in the list of additional parameters) by selecting another installed language.

You may also need to change the coded character set identifier (CCSID) of your server to match the configuration of your browser.

Starting your administration (ADMIN) server

You must have TCP/IP started before you can start your ADMIN server. Starting the ADMIN server instance allows you to use the Configuration and Administration forms to configure your server, change the instance parameters, and global attribute values.

Starting your ADMIN server also allows you to: v View your AS/400 Tasks page.

v View your server’s Front page.

v Use the Configuration and Administration forms. v Change ADMIN server ports.

Use Operations Navigator to start the ADMIN server instance:

1. Start Operations Navigator.

2. Double-click your AS/400 server in the main tree view of Operations navigator.

3. Double-click Network.

4. Double-click Servers.

5. Double-click TCP/IP.

6. Right-click HTTP Administration.

7. Click Start.

You can stop the ADMIN server instance whenever you want to do so. Follow the instructions above. When you right-click HTTP Administration, click Stop.

(21)

The ADMIN server as shipped does not automatically start when you start

TCP/IP. You must start it manually at least once. If you want the ADMIN server to start automatically when you start TCP/IP, you must change the server instance parameters.

The configuration that is provided with ADMIN allows this server instance to protect the content it serves. However, when necessary, you can make some basic changes to the configuration, including the following:

v Having the ADMIN server instance start automatically whenever you use the Start TCP/IP (STRTCP) command

v Configuring for HTTP secure transactions (SSL) v Enabling access and error logging

Your IBM HTTP Server provides both a secure and an unsecure connection. No matter what connection you use, the standard AS/400 security remains, and your server works from an AS/400 user profile (*USRPRF). This profile needs access to every object it serves or updates. Your server provides a secure connection after you:

1. Verify your server installation.

2. Install one of these three IBM Cryptographic Access Provider products: v 5769–AC1

v 5769–AC2 v 5769–AC3

3. Create a key for secure connections.

4. Send a certificate request, then receive the signed certificate from a widely-known certification authority (CA), such as VeriSign. This CA is

designated as a trusted root on your server. You can use the CA that is shipped with the Digital Certificate Manager to issue your own certificates in an

intranet environment.

5. Configure a server instance for Secure Sockets Layer (SSL) through the administration (ADMIN) server.

You can stop, start, and restart other server instances on your Web server using the Configuration and Administration forms.

Viewing your AS/400 Tasks page

The AS/400 Tasks page gives you links to the IBM HTTP Server and other browser interfaces to AS/400 products. To view the Tasks page, you must start the

administration (ADMIN) server instance. Then:

1. Direct a Web browser that supports frames and JavaScript to the following location: http://your.server.name:2001/ where your.server.name is the name of your AS/400 system, and sign on to the Tasks page with a valid USERID and password.

The first time you view the AS/400 Tasks page, you must use the unsecure connection for serving Web documents. Keep in mind that the standard AS/400 security remains in effect and your server works from an AS/400 user profile (*USRPRF). That profile needs access to every object it serves or updates.

2. If you configured your administration (ADMIN) server instance for secure serving, go to http://your.server.name:2010/

Note: The default port numbers are 2001 and 2010, and you can change them in the TCP/IP host services table.

(22)

3. If the ADMIN server instance is not active on your system, or if you try going to the wrong port number, your browser request will time out (when

attempting to connect to the ADMIN server) and you will not be prompted for a USERID and password.

Viewing your server’s front page

To view your server’s front page, click IBM HTTP Server for AS/400 on the AS/400 Tasks page. The front page of your server provides a valuable assortment of tools and information, including links to:

Configuration and Administration

A site that allows you to completely configure your server by filling in a set of forms. The forms use hypertext markup language (HTML).

Sample Home Page

A sample document that demonstrates how to use many of the HTML tags.

IBM HTTP Server Web site

From this Web site, you can learn more about IBM HTTP Server, find product information, and access related resources. You must have external Internet access to reach this page.

Technical Studio for AS/400

From this Web site, you can learn about AS/400 workshops, tools, and technical information. You will find tips to make your AS/400 run faster, let you take advantage of late breaking technologies, and help you keep your professional edge. You must have external Internet access to reach this page.

AS/400 Web Builder’s Workshop

From this Web site, you can find tips, tools, sample applications, and more to speed your entry into the world of Web computing with AS/400. You must have external Internet access to reach this page.

AS/400 Tasks page

Return to the AS/400 Tasks page to configure other AS/400 features, such as the Digital Certificate Manager or the IBM CommercePOINT eTill for AS/400.

Using the Configuration and Administration forms

Starting the ADMIN server enables you to use the Configuration and

Administration forms. These forms provide an easy way for you to configure your server by using a Web browser. For assistance, you can consult the help file which accompanies each form.

Follow these steps to use the Configuration and Administration forms.

1. Using your browser, go to the AS/400 Tasks page by typing the following URL:

Non-secure connection: http://your.server.name:2001/ Secure connection: https://your.server.name:2010/

where your.server.name is the name of your AS/400 system as specified in the Configure TCP/IP display, option 12.

(23)

2. Enter a valid AS/400 user ID and password.

3. Click IBM HTTP Server for AS/400.

4. At the front page for your server, click Configuration and Administration, and you will see the first page of the forms in your browser. The first form gives a description of the interface and instruction for using the forms.

5. From the page of General Configuration and of Administration, click

Configurations.

6. From the menu, select a named server configuration that you want to

configure. When you select a form, you see the current configuration values in its input fields. (If you have not changed your configuration since installation, these are the default values.)

7. From the menu of forms, click on the name of the form you need to configure your server (such as Global log file settings).

8. From any form, enter information about how you want to configure that particular part of your server. Each form provides instructions to assist you in deciding what changes to make. For further information, you can click the help icon at the top of each form. The help icon links you to a help page that provides detailed steps for using the form to perform particular tasks.

9. After you fill in the form, you must click Apply to update the configuration file with the changes that you made to the form. The Apply button is located below the input fields in each form. If you decide that you do not want to use the changes you made to the form, click Reset. This returns the fields on the form to the values prior to the changes you made.

10. If you clicked Apply, the form displays a message that indicates whether the server accepted the configuration changes that you specified. If the server accepts the input, the form displays a message that tells you that the server successfully updated the configuration. If the server does not accept the input, the server displays a message that explains what was wrong with the

information you entered. Go back to the form to correct the information, and then click the Apply button again. From the form you may also want to click the help icon at the top of the form. The help pages explain how to fill in the form with valid entries.

You must restart the server so that the changes you made to the configuration are saved and take effect. Updating some configuration forms will require you to stop the server and then start it again for the changes to take effect. Click on the help icon at the top of a form to view the help page for that form. This help page tells you if you need to restart the server or stop and start the server.

When you make changes to any instance parameters, you will need to work with that instance to restart or stop and start that specific instance. The Configuration and Administration forms tell you what steps to take as you work through them.

Note: You can use the menu of forms to go to a different form at any time.

Changing ports for the administration (ADMIN) server

The default HTTPserver port is 80 for non-secure transactions and port 443 for secure transactions. You should configure the ADMIN server on different ports than your other server instances. The ADMIN server comes with two selected ports, 2001 for non-secure transactions, and 2010 for secure transactions. These port numbers should work satisfactorily with most systems. However, these port assignments could cause conflicts if a TCP/IP application other than the ADMIN server uses the same port numbers and needs to run concurrently with the

(24)

ADMIN server. Most applications allow you to change ports, so if the conflicting application allows this, select a different number for that application.

If you need to change the ports associated with the ADMIN server instance, use the TCP/IP services table. This table maps services to port numbers and AS/400 APIs that allow TCP/IP applications to determine the ports for the ADMIN server. To change ports by using the TCP/IP services table complete the following steps:

1. Type WRKSRVTBLE and press the Enter key.

(The servers you need are right at the top of the list: as-admin-http, as-admin-https.)

2. To change the port associated with the server, go to the line you want to remove then type 4, press Enter, and then press Enter again to confirm.

3. On the Work with Service Table Entries screen, move to the top line of the table then type 3 and press ENTER.

4. Type the properties for the new server and port then press ENTER to add it to the table.

Starting and stopping your server

Before you start your Web server, you must verify that it is installed, and you must configure and start TCP/IP. This will allow you to configure your IBM HTTP Server.

Note: To configure any server instance that uses the Configuration and Administration forms, the administration (ADMIN) instance must be running.

Use the Working with server instances form to start, stop, and restart your server.

Creating a home page

You can use any hypertext markup language (HTML) document for your home page.

Using the sample home page.

Your Web server has a sample home page that you can use as a template for your own pages. To view the sample home page you must have the ADMIN server instance started.

1. Enter http://your.server.name:2001/ to view the AS/400 Tasks page with your browser. If you configured the ADMIN server for secure serving, enter

http://your.server.name:2010/ to view the AS/400 Tasks page.

2. Click IBM HTTP Server on the AS/400 Tasks page to see your server’s front page.

3. Click Sample Home Page to see the example.

4. From your Web browser, select Save As from the File menu on the menu bar.

5. Save the file with a name of welcome.html and then use your choice of editors to edit the new welcome.html file.

6. Send welcome.html to your AS/400 system by using the File Transfer Protocol (FTP) or Client Access.

The integrated file systems on the AS/400 serves ASCII documents. If you use FTP, you have your choice of what method you use to move a file to the

(25)

AS/400. You can use SMB or NetServer with Operations Navigator to map drives and put files in the integrated file system, as well as FTP or Client Access.

FTP can move documents to the integrated file system directories in ASCII when you use one of the following FTP subcommands.

v From the server:

namefmt 1

v From the client:

quote site namefmt 1

After you enter this subcommand, you can put your home page in an

integrated file system. For example, to put your file in the OpenSys file system, enter:

put welcome.html /QOpenSys/websamp/welcome.html

Using other sample text in a browser.

You can also create your own home page that is based on this sample text:

Sample welcome page

<HTML> <HEAD> <TITLE>Sample Document</TITLE> </HEAD> <BODY> <H1>IBM HTTP Server</H1>

<P>This document is served by the IBM HTTP Server. </BODY>

</HTML>

Another option is to create your home page in an AS/400 library.

Once you create your page, from whatever source you choose, you need to authorize and enable your server to access and serve your home page.

After the basics are set, you can embellish your Web pages in many ways. Many people use graphics formats like joint photographic experts group (JPEG), graphics interchange format (GIF), and image map.

Creating a home page in a library

You can create your home page on an AS/400 system by creating the hypertext markup language (HTML) document as a source physical file in an AS/400 library.

1. If you want to create a new source physical file, use the Create Source Physical (CRTSRCPF) command.

CRTSRCPF FILE(WEBSAMP/HTMLDOC) RCDLEN(240)

Note: The default record length for files on AS/400 is 80 (usable) characters. The maximum record length that you can edit on AS/400 is 240

characters. You can create files with greater record lengths on AS/400. If you do so you will not be able to edit them using the Start System Edit Utility (STRSEU) command.

(26)

2. Create a member for your home page by using the AS/400 Programming Development Manager (PDM).

Use the Start PDM (STRTPDM) command if you have Application Development ToolSet/400 (5769-PW1) installed:

STRPDM

If the Application Development ToolSet/400 product is not installed you can use the Add Physical File Member (ADDPFM) command instead.

ADDPFM FILE(WEBSAMP/HTMLDOC) MBR(SAMPLE)

Select option three Work with members to see the″Specify Members to Work with″ display.

Press F6 to create a new source member and add it to the

WEBSAMP/HTMLDOC physical file. Type the name of the source member

SAMPLEand change the source type to HTML.

Press Enter to bring up the editor and add the text of your home page to the member you just created.

When you have finished creating your home page, press F3.

3. If you serve your home page from the QSYS.LIB and you did not use the AS/400 Programming Development Manager (PDM) to create your welcome page, you must change the source type of the member to HTML. Use the Change Physical File Member (CHGPFM) command:

CHGPFM FILE(WEBSAMP/HTMLDOC) MBR(SAMPLE) SRCTYPE(HTML)

4. If you will be serving your home page from the integrated file system, you must convert the member you just created to ASCII format. Copy the member by using the Copy to Stream File (CPYTOSTMF) command to the integrated file system″root″ directory or to one of the file systems your server supports. Once you create your page, from whatever source you choose, you will need to authorize and enable your server to access and serve your home page.

(27)

Chapter 7. Supporting multiple Web sites on the HTTP Server

You may want to use one server to provide Web sites for multiple customers. For example, you might have two customers (customer A and customer B), both of whom want to make information about their companies available on the World Wide Web. Put both sites on the same machine if the number of requests for the information is not enough to justify a machine for each customer.

With your server, you can use multiple Internet Protocol (IP) addresses, virtual hosts, or both to provide multiple Web sites on one server.

To use multiple IP addresses your machine must have multiple network

connections, however it is possible to specify multiple IP addresses on one network connection.

Requests to the other server would have to include a port number.

If your machine had two network connections, or one or more adapters, you can run one instance of the server. You can also assign each customer to a different IP address. For each IP address you would define a different host name. So customer A could be www.customerA.com on IP address 9.67.106.79, and customer B could be www.customerB.org on IP address 9.83.100.45. You could then configure the server to serve a different set of information depending on the IP address from which the request arrives. Because the server can accept requests from the default port of each network connection, requests to either host name would not require a port number.

With virtual hosts, you do not need additional hardware, and you can save IP addresses. However, clients must support HTTP 1.1 or HTTP 1.0 with 1.1

Extensions. You can run just one instance of the server and assign each customer to a different host name. In the domain name server, define all your host names and associate them with the lone IP address of your server. You can then configure the server to serve a different set of information depending on the host that is making the request. Requests do not require a port number because the server uses the default.

Setting up your server to use multiple IP addresses or virtual hosts is very similar. For multiple IP addresses, you need to specify the IP address on which a request arrives. For virtual hosts, you need to specify the host name for which a request is made. When using multiple IP addresses you also need to specify config file directives, with the host name, for the 1.1 browsers to work.

You can configure the server to serve different information for each customer. Do this by indicating that certain parts of your configuration apply only to requests that arrive on certain addresses or for certain hosts. You can configure three server parts to process requests that are based on the IP address on which they arrive, or the URL host name:

v Welcome pages v Mapping rules v Access control

(28)

A server instance relates to starting your server. It is not, however, the same as starting your server.

1. You must start an individual server instance by working with the server instances form.

2. You are required to create server instances one at a time in order to run multiple server instances.

3. Once you have clients who use your server to run their Web page or pages, you can manage your system with the following:

v Deleting an instance. v Changing an instance.

4. Instances use associated configurations.

v If you wish to create your own configurations, you may do so. v You can also change the associated configuration of an instance. Once you create them, you must remember to authorize and enable your file system to serve the files you create.

Creating a server instance

When you create a server instance, you must choose between using a unique IP address or the same IP address with a unique port. You must specify a

configuration to associate with the new server instance. This configuration must already exist.

Use the Configuration and Administration forms to create a server instance.

1. Click Server Instances.

2. Click Create server instance.

3. Enter a name in the Create server instance form that is provided.

4. Select an associated configuration from the same form.

5. Click the Create button.

You will receive a message that tells you whether or not the task completed successfully.

Creating one instance at a time is the only way to create multiple instances. If you decide not to keep it, you can delete an instance. Or, if you prefer, you can simply change the instance.

Deleting a server instance

As your client base grows and changes and you add or move employees, you may need to redefine your list of server instances. This includes removing instances from the list.

Note: Once you delete a server instance, you cannot retrieve it. You must create an instance to replace the one deleted. If the server instance you selected is running, it stops before the system deletes it. The system does not delete the server configuration that is associated with this server instance.

Use the Configuration and Administration forms to delete a server instance.

(29)

2. Click Delete server instance.

3. The Delete server instance form will provide a list from which you must choose the server instance you wish to delete.

4. Click Delete to remove the server instance.

You will receive a message that tells you whether or not the task completed successfully.

If you do not wish to delete an instance entirely, you can simply change it.

Changing server instance parameters

Changes in your clientele and your employees may mean that you will want to change the parameters of a server instance you have created. For example, this task allows you to have a server instance, such as your administration (ADMIN)

instance, start automatically when you start TCP/IP.

Use the Configuration and Administration forms to change a server instance.

1. Click Server Instances.

2. Click Change instance parameters.

3. Select a server instance from the list on the first page of the Change instance

parameters form that is provided.

4. Click Next.

5. Change the instance parameters as desired on page two of the Change instance

parameters form.

6. Click the Apply button.

7. You must stop and start the server instance to save the changes you have made and have them take effect.

You will receive a message that tells you whether or not the task completed successfully.

You can create a new instance or delete an existing instance, rather than changing a current instance. You can also change an instance’s associated configurations.

Changing associated configurations

When you create a server instance, you must select a configuration to use with the instance. At any time, you may choose to change which configuration the server instance uses.

Use the Configuration and Administration forms to change a server instance’s associated configuration.

1. Click Server Instances.

2. Click Change associated configuration.

3. In the Change associated configuration form that is provided, select a server instance and an associated configuration from the lists at the bottom of the form.

4. Click the Apply button.

You will receive a message that tells you whether or not the task completed successfully.

(30)

Note that you are not allowed to change the associated configuration for the ADMIN instance. It is required to be the ADMIN configuration.

Some configuration changes, such as changing the port, will require that you stop and start instances to activate the changes.

You can control when changes to your configuration take effect. Make as many changes to a configuration as you want by using the forms. When you have the configuration the way you want it, you can restart or start and stop the correct server instances to activate the changes.

You do not need to restart or stop and start the server instances after each configuration change.

You can also create a configuration of your own, or simply display a configuration to view needed changes.

Working with server instances

You can define multiple HTTP servers and run them concurrently on an AS/400. Each server is an instance and is named. Working with server instances lets you select an instance and the action to perform on that instance. Once you select an instance, you can start, stop, restart, or monitor that instance. When starting the server instance, startup parameters that are specified are used by the server instance until the server is started again.

Use the Configuration and Administration forms to work with a server instance.

1. Click Server Instances.

2. Click Work with server instances.

3. In the list on the Work with server instance form that is provided, select the instance with which you want to work.

4. Enter your startup parameters in the field that is provided on the form.

5. Click Start, Stop, Restart, or Monitor, as desired.

There are several tasks that require you to use this form to restart or stop and start the instance involved.

(31)

Chapter 8. Storing and serving Web pages

Understanding the AS/400 Integrated File System allows you to make decisions about storing your hypertext markup language (HTML) files. You also need to understand how you enable the server to serve the files. This includes

understanding Pass directives and Welcome pages.

The Integrated File System treats the library support and folders support as separate file systems.

Before you start serving your home page from the Integrated File System, you must ensure that the world can access the files that you want to serve. You must grant the QTMHHTTP user profile or *PUBLIC the following authorities and permissions to enable Web serving with IBM HTTP Server for AS/400:

v QTMHHTTP or *PUBLIC must have *USE authority to all AS/400 library system objects that you intend to serve.

v If you use any of the log directives (such as the AccessLog or ErrorLog) with any Integrated File System directory name, the directory must exist, and QTMHHTTP or *PUBLIC must have *RWX authority.

v The QTMHHTTP user profile or *PUBLIC must be granted *RX authority to all objects (HTML pages, graphics, and so on) that you intend to serve.

v To use “CGI” on page 95 programs to access any of the objects you serve, the QTMHHTP1 user profile or *PUBLIC needs the same authority to the objects as QTMHHTTP.

A file system provides the support that allows users and applications to access specific segments of storage that are organized as logical units. These logical units are files, directories, libraries, and objects.

Each file system has a set of logical structures and rules for interacting with information in storage. These structures and rules may be different from one file system to another. From the perspective of structures and rules, the AS/400

support for accessing database files and various other object types through libraries can be thought of as a file system. Similarly, you can think of the AS/400 support for accessing documents (which are really stream files) through the folders structure as a separate file system. The following topics, listed in order of

preference, will help you choose the file system, within the Integrated File System, that is right for you:

v “Serving Web pages from the root (or /) file system” on page 27 v “Serving Web pages from the QOpenSys file system” on page 28 v “Serving Web pages from the QSYS.LIB file system” on page 29 v “Serving Web pages from the QDLS file system” on page 30 v “Serving Web pages from the QOPT file system” on page 31 v “Serving Web pages from the UDFS file system” on page 32

As you decide from which file system to serve files, you might want to consider the following:

v Serving from the root (or /) directory gives you the fastest response times. v Will the tools you use to maintain your site be compatible with the file system

you choose?

v How easy must it be to move content from platform to platform?

(32)

Remember that any individual server instance can serve content (CGI scripts; HTML files; graphics such as .jpegs, GIFs, and image maps; and so on) from many file systems at once. You can configure your server instances to serve content from whatever file systems suit your needs.

It is possible, too, to develop your Web pages beyond the basics.

Once your Web page has been created you may wish to test your URL routing.

Working with Welcome directives and Pass directives

Your server serves content depending on the order of statements or directives in the server configuration. If you are using the DEFAULT server instance, the server configuration that the server uses is CONFIG. If you are using an instance other than the DEFAULT instance, you will need to refer to the server configuration that is associated with the server instance.

Two important directives affect your server’s welcome page. They are the Welcome directive and the Pass directive. The server uses the Welcome directive to specify which file it serves when it receives a request that does not contain a specific file name. For example:

WELCOME WELCOME.HTML

In the above example the server looks for a file that is called welcome.html to serve as the welcome page.

The other important directive that affects your server’s welcome page is the Pass directive. The Pass directive specifies a template for requests your server accepts. If the request matches the template, the server responds by serving the appropriate document. For example:

Pass / /QIBM/ProdData/HTTP/Public/HTML/Welcome.html

In the above example, the template is blank. If the server receives a request with no directory or file name, it matches this template. Then, the server serves the welcome.html document.

Use the Configuration and Administration forms to add Pass directives.

1. Click Configurations.

2. Click Request Processing.

3. Click Request routing.

4. Complete the Request routing form that is provided.

5. Click the Apply button.

You will receive a message that tells you whether or not the task completed successfully.

If you wish to activate your changes, you must restart the server.

Not only are Pass directives and Welcome directives order dependent, but any combination of the PASS, EXEC, REDIRECT, FAIL, Service, Translate directives is also order dependent.

You will need to add Pass directives after enabling any of the file systems: v Root (or /)

(33)

v QOpenSys v QSYS.LIB v QDLS v QOPT v UDFS

Use this same form to customize your server’s request processing.

Serving Web pages from the root (or /) file system

The root (or / (slash)) file system takes full advantage of the stream file support and hierarchical directory structure of the Integrated File System. The root file system has the characteristics of the Disk Operating System (DOS) and IBM OS/2 (Operating System/2) file systems.

You can serve content (HTML files; graphics such as .jpegs, GIFs, and image maps; and so on) from the root file system. To serve content from root, you must

complete three steps.

1.

Storing your home page in the root file system.

In the root file system, use the Create Directory (CRTDIR) CL command to create a directory:

CRTDIR DIR(WEBSAMP)

You can then copy your home page and other related files into that directory by using file transfer protocol (FTP) or by using a PC with Client Access/400.

2.

Authorizing your server to serve your home page from the root file system.

Authorize the HTTP profile QTMHHTTP to serve your home page. For root, use the Change Authority (CHGAUT) command:

CHGAUT OBJ('/WEBSAMP') USER(QTMHHTTP) DTAUT(*RX)

CHGAUT OBJ('/WEBSAMP/WELCOME.HTM') USER(QTMHHTTP) DTAAUT(*RX)

3.

Enabling your server to serve your home page from the root file system.

When a client uses a URL to request a document from the server and the URL refers to a directory with no file specified, the server searches the directory for a name specified on a Welcome directive. Without a specified Welcome directive, the default name is Welcome.html.

If you intend to serve welcome files from the root file system, you will need two welcome directives in your configuration file:

Welcome Welcome.htm Welcome Welcome.html

Use the Configuration and Administration forms to add Welcome directives to your configuration.

a. Click Configurations.

b. Click Directories and Welcome Page.

c. Click Welcome page.

d. Complete the Welcome page form that is provided.

e. Click the Apply button.

(34)

You will receive a message that tells you whether or not the task completed successfully.

If you wish to activate your changes, you must stop and start the server.

Serving Web pages from the QOpenSys file system

The open systems file system is compatible with UNIX-based open system standards, such as the Portable Operating System Interface for Computer

Environments (POSIX) and the X/Open Portability Guide (XPG). Like the root (/) file system, it takes advantage of the stream file and directory support that is provided by the Integrated File System. In addition, it supports case-sensitive object names.

You can serve content (HTML files; graphics such as .jpegs, GIFs, and image maps; and so on) from the QOpenSys file system. To serve content from QOpenSys, you must complete three steps.

1.

Storing your home page in the QOpenSys file system.

Create a directory or folder in which to store your home page as well as other documents.

In the QOpenSys file system use the CRTDIR command to create a directory:

CRTDIR DIR('/QOpenSys/websamp')

Substitute the name of your directory where WEBSAMP appears in the example. You must grant *RX rights to the QTMHTTP user profile for every directory in the path from where you serve documents.

You can then copy your home page and other related files into that directory by using file transfer protocol (FTP) or by using a PC with Client Access/400.

Note: File names in the QOpenSys are case sensitive.

2.

Authorizing your server to serve your home page from the QOpenSys file system.

To authorize your server to serve your home page from QOpenSys, authorize the HTTP profile QTMHHTTP to your home page by using the Change Authorization (CHGAUT) command:

CHGAUT OBJ('/QOpenSys/WEBSAMP') USER(QTMHHTTP) DTAUT(*RX)

CHGAUT OBJ('/QOpenSys/WEBSAMP/WELCOME.HTM') USER(QTMHHTTP) DTAAUT(*RX)

3.

Enabling your server to serve your home page from the QOpenSys file system.

When a client uses a URL to request a document from the server and the URL refers to a directory with no file specified, the server searches the directory for a name specified on a Welcome directive. The default name is Welcome.html for an unspecified Welcome directive.

If you intend to serve welcome files from the QOpenSys file system, you will need two welcome directives in your configuration file:

Welcome Welcome.htm Welcome Welcome.html

(35)

Use the Configuration and Administration forms to add Welcome directives to your configuration.

a. Click Configurations.

b. Click Directories and Welcome Page.

c. Click Welcome page.

d. Complete the Welcome page form that is provided.

e. Click the Apply button.

You will receive a message that tells you whether or not the task completed successfully.

If you wish to activate your changes, you must stop and start the server.

Serving Web pages from the QSYS.LIB file system

The library file system supports the AS/400 library structure. This file system provides access to database files and all of the other AS/400 object types that the library support manages.

You can serve content (HTML files; CGI scripts; and so on) from the QSYS.LIB file system. To serve content from QSYS.LIB, you must complete four steps.

To store your home page in the QSYS.LIB, you will need to create a library in QSYS.LIB. This stores your HTML file and other related documents and objects. In the following example, we use″WEBSAMP″ simply as a sample name.

1.

Create a separate file.

You must also create a separate file, which we will call HTMLDOC. In QSYS.LIB, use the Create Library (CRTLIB) command to create a user library:

CRTLIB LIB(WEBSAMP)

Now proceed to create the HTML.DOC file:

CRTSRCPF FILE(WEBSAMP/HTMLDOC) RCDLEN(240)

2.

Store your home page in the QSYS.LIB file system.You must use SEU or DFU to create a member in the file with the welcome page. Or, you may use file transfer protocol (FTP) to move a member into the file with the welcome page.

3.

Authorize your server to serve your home page from the QSYS.LIB file system.

Authorize the HTTP profile QTMHHTTP to serve your home page. For the QSYS.LIB, use the Grant Object Authority (GRTOBJAUT) command:

GRTOBJAUT OBJ(WEBSAMP/HTMLDOC)

OBJTYPE(*FILE) USER(QTMHHTTP) AUT(*USE)

after you create the HTMLDOC file.

4.

Enabling your server to serve your home page from the QSYS.LIB file system.

When a client uses a URL to request a document from the server and the URL refers to an AS/400 file with no member specified, the server searches the file

(36)

for a member with a name specified on a Welcome directive. The default name is Welcome for an unspecified Welcome directive. The member source type must be HTML.

Use the Configuration and Administration forms to add Welcome directives to your configuration.

a. Click Configurations.

b. Click Directories and Welcome Page.

c. Click Welcome page.

d. Complete the Welcome page form that is provided.

e. Click the Apply button.

You will receive a message that tells you whether or not the task completed successfully.

If you wish to activate your changes, you must stop and start the server.

Serving Web pages from the QDLS file system

The document library services file system supports the folders structure. It provides access to documents and folders.

You should use this file system if the data you want to serve resides in the AS/400 PC Support Shared Folders of the AS/400 office support. You can also use this file system if you intend to use Office or PC Support Shared Folders to populate the data you want to serve.

You can serve content (HTML files; CGI scripts; graphics such as .jpegs, GIFs, and image maps; and so on) from the QDLS file system. To serve content from QDLS, you must complete three steps.

1.

Storing your home page in the QDLS file system.

Create a directory or folder in which to store your home page as well as other documents.

In the QDLS file system, use the Create Folder (CRTFLR) command to create a folder:

CRTFLR(WEBSAMP)

Substitute the name of your folder where WEBSAMP appears in the example. You can then copy your home page and other related files into that directory by using file transfer protocol (FTP) or by using a PC with Client Access/400.

2.

Authorizing your server to serve your home page from the QDLS file system.

To authorize your server to serve your home page from QDLS, follow these steps:

a. Add a directory entry to the system distribution directory for the QTMHHTTP user profile. You can use the Work with Directory Entries (WRKDIRE) CL command or use the administrative function of OfficeVision.

b. Authorize the HTTP profile QTMHHTTP to your home page by using the Change Authorization (CHGAUT) command:

(37)

CHGAUT OBJ('/QDLS/WEBSAMP') USER(QTMHHTTP) DTAUT(*RX)

CHGAUT OBJ('/QDLS/WEBSAMP/WELCOME.HTM') USER(QTMHHTTP) DTAAUT(*RX)

3.

Enabling your server to serve your home page from the QDLS file system.

When a client uses a URL to request a document from the server and the URL refers to a directory with no file specified, the server searches the directory for a name specified on a Welcome directive. The default name is Welcome.html for an unspecified Welcome directive.

If you intend to serve welcome files from the QDLS file system, you will need two welcome directives in your configuration file:

Welcome Welcome.htm Welcome Welcome.html

Use the Configuration and Administration forms to add Welcome directives to your configuration.

a. Click Configurations.

b. Click Directories and Welcome Page.

c. Click Welcome page.

d. Complete the Welcome page form that is provided.

e. Click the Apply button.

You will receive a message that tells you whether or not the task completed successfully.

If you wish to activate your changes, you must stop and start the server.

Serving Web pages from the QOPT file system

The optical file system provides access to stream data that is stored on optical media, such as CD-ROM.

You can serve content (HTML files; graphics such as .jpegs, GIFs, and image maps; and so on) from the QOPT file system. To serve content from QOPT, you must complete three steps.

1.

Storing your home page in the QOPT file system.

Create a directory or folder in which to store your home page as well as other documents.

In the QOPT file system, use the Create Folder (CRTFLR) command to create a folder:

CRTFLR(QOPT/WEBSAMP)

Substitute the name of your folder where WEBSAMP appears in the example. You can then copy your home page and other related files into that directory.

2.

Authorizing your server to serve your home page from the QOPT file system.

To authorize your server to serve your home page from QOPT, authorize the HTTP profile QTMHHTTP to your home page by using the Change

Authorization (CHGAUT) command:

(38)

CHGAUT OBJ('/QOPT/WEBSAMP') USER(QTMHHTTP) DTAUT(*RX)

CHGAUT OBJ('/QOPT/WEBSAMP/WELCOME.HTM') USER(QTMHHTTP) DTAAUT(*RX)

3.

Enabling your server to serve your home page from the QOPT file system.

When a client uses a URL to request a document from the server and the URL refers to a directory with no file specified, the server searches the directory for a name specified on a Welcome directive. The default name is Welcome.html for an unspecified Welcome directive.

If you intend to serve welcome files from the QOPT file system, you will need two welcome directives in your configuration file:

Welcome Welcome.htm Welcome Welcome.html

Use the Configuration and Administration forms to add Welcome directives to your configuration.

a. Click Configurations.

b. Click Directories and Welcome Page.

c. Click Welcome page.

d. Complete the Welcome page form that is provided.

e. Click the Apply button.

You will receive a message that tells you whether or not the task completed successfully.

If you wish to activate your changes, you must stop and start the server.

Serving Web pages from the UDFS file system

The user-defined file system resides on the Auxiliary Storage Pool (ASP) of your choice. You can create and manage this file system.

You can serve content (HTML files; graphics such as .jpegs, GIFs, and image maps; and so on) from the UDFS file system. To serve content from UDFS, you must complete three steps.

1.

Storing your home page in the UDFS file system.

Create the directory where you will mount your UDFS. This must be in the Root or QOpenSys file system.

You can use an existing directory, but its contents will be masked when your UDFS is mounted. Use the Create Directory (CRTDIR) command to create the directory:

CRTDIR(UDFSMOUNT)

or

CRTDIR(QOpenSys/UDFSMOUNT)

Create the UDFS using the Create UDFS (CRTUDFS) command:

(39)

Substitute the name of your UDFS where name appears in the example. Substitute a valid Auxiliary Storage Pool (ASP) number where the XX appears in the example. The other parts of the path name must appear as in the example above.

Use the Mount (MOUNT) command to mount your UDFS on the directory:

MOUNT TYPE(*UDFS) MFS(/dev/qaspXX/name.udfs) MNTOVRDIR(UDFSMOUNT)

Substitute your UDFS name where name appears in the example. Substitute a valid Auxiliary Storage Pool (ASP) number where the XX appears in the example. The rest of the MFS name must appear as in the example. Substitute the directory name you want to mount where UDFSMOUNT appears in the example. The Mount will not survive an IPL, so you will either have to manually Mount your UDFS after an IPL or put the Mount command in your startup program.

In the UDFS file system, use the Create Directory (CRTDIR) command to create a folder:

CRTDIR(UDFSMOUNT/WEBSAMP)

Substitute the name of your UDFS mount directory where UDFSMOUNT appears in the example.

You can then copy your home page and other related files into that directory by using file transfer protocol (FTP) or by using a PC with Client Access/400.

2.

Authorizing your server to serve your home page from the UDFS file system.

To authorize your server to serve your home page from UDFS, authorize the HTTP profile QTMHHTTP to your home page by using the Change

Authorization (CHGAUT) command:

CHGAUT OBJ('/UDFSMOUNT/WEBSAMP') USER(QTMHHTTP) DTAUT(*RX)

CHGAUT OBJ('/UDFSMOUNT/WEBSAMP/WELCOME.HTM') USER(QTMHHTTP) DTAAUT(*RX)

3.

Enabling your server to serve your home page from the UDFS file system.

When a client uses a URL to request a document from the server and the URL refers to a directory with no file specified, the server searches the directory for a name specified on a Welcome directive. The default name is Welcome.html for an unspecified Welcome directive.

If you intend to serve welcome files from the UDFS file system, you will need two welcome directives in your configuration file:

Welcome Welcome.htm Welcome Welcome.html

Use the Configuration and Administration forms to add Welcome directives to your configuration.

a. Click Configurations.

b. Click Directories and Welcome Page.

c. Click Welcome page.

d. Complete the Welcome page form that is provided.

e. Click the Apply button.

(40)

You will receive a message that tells you whether or not the task completed successfully.

If you wish to activate your changes, you must stop and start the server.

Testing your URL routing

This form will be available under the Configuration section of the forms. The Webmaster would first select a configuration from the menu, and then click on the ôTest URL routingö form under the ôRequest Processingö heading. This form is useful if you wish to understand the routing directives for your server, which in turn determine how your server processes URLs. When the form first appears, the results table shows the routing information for the URL″/″.

Complete the following steps in order to test URL routing:

1. Enter the URL to test in the URL to test field. For example: http://www.ibm.com/some/url.html

2. Click Test to perform the test.

The URL specified is tested against the existing routing directives. The results appear in the table showing all directives (even if they do not apply to the URL tested). Also note the Enable case sensitive mapping rules option above the table. This indicates whether the URL that matches the routing directives is case sensitive or not.

The table provides the following information:

v Action: The routing directive found in the configuration file. v URL template: The URL template provided on the directive.

v Replacement file path: The optional replacement path from the directive. v Server address: The optional IP host name or address specified on the directive. v Matched: A″Yes″ or ″No″ value that indicates if this directive applies to the

URL that is being tested.

v New URL: The new URL, file, or program possibly transformed based on the replacement path specified on this directive.

For more information concerning the Test URL routing form please feel free to consult the on-line help.

(41)

Chapter 9. IBM HTTP Server administration

Administration tasks give your server structure by setting up attributes. You cannot work with administration until your administration (ADMIN) server is running. Then you are free to make as many or as few changes as you wish. You need not follow a step-by-step process to set up most server attributes, but you should configure your server before proceeding to the other tasks.

After you configure your server, you can manage user access to your server and decide who will have access to your server resources.

Administration also means improving your server’s performance. You can work with your server in a variety of ways:

v Customize your error messages so they are appropriate to your system. v Set up directory listings and welcome pages to suit your needs.

v Define file extensions for multiformat processing so you can work with “MIME” on page 98.

Most of these attributes use defaults. You may choose to keep these settings, or you may prefer to change them as you get to know your IBM HTTP Server.

Configuring HTTP Server

Your server has built-in default configurations. But configuring your server allows you to change those default settings to your needs. You can do the following with configurations:

v Create a configuration of your own. v Delete an existing configuration.

v Display a configuration of your choosing

When you create a server instance, you must specify a configuration to use with it. Server instances can share the same configuration file. However, in a case where you configure logging and reporting in a configuration, only one server instance should use that configuration.

Note: To work with your server configurations, start the administration (ADMIN) server.

Creating a configuration

The default configurations will most likely not suit your particular needs (The default request routing rule is to ’Fail’ all requests and the default proxy settings are OFF) so you will have to make a configuration which works for you. The ″Create configuration″ form allows you to create an empty configuration, or a new configuration based on an existing configuration. You can then modify the new configuration to suit your needs.

Use the Configuration and Administration forms to create a configuration on your IBM HTTP Server.

1. Click Configurations.

References

Related documents

Because export is one of the driving factor of the region economy, so researchers are interested to analyze the export performance of the provinces in

The leading GSM services providers in the Indian telecom industry 2009 were Hutchison (Now Vodafone and known as Orange in Maharashtra), Airtel, Idea Telecom, Tata, and

The code states that the basic span-to-effective depth ratios given in Table 3.10 for The code states that the basic span-to-effective depth ratios given in

[r]

Microphotograph of Metarhizium anisopliae 4 infecting Tetranychus kazawai 4 days after inoculation by Scanning electron microscope micrographs (800 X). a) Conidia adhered to

Hipped roof, covered in red plain clay tiles, with red brick construction to walls and sandstone plinth, and brick dentil course to eaves. Small diamond-shaped aeration

You just need to sit tight and you’ll learn the exact process that me and 100’s of other women have been using for years to help you increase your breast size naturally, by

We consider a binary-event prediction market in which traders have heterogeneous prior beliefs. We derive conditions so that the predic- tion market is accurate in the sense that