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



Similar documents
Networking File Transfer Protocol

Implementing Secure Sockets Layer on iseries

ERserver. iseries. Secure Sockets Layer (SSL)

BusinessLink Software Support

ERserver. iseries. Networking TCP/IP Setup

Serving tn5250j in Web Documents from the HTTP Server for iseries

ERserver. iseries. Securing applications with SSL

Sharp Remote Device Manager (SRDM) Server Software Setup Guide

Tivoli Access Manager Agent for Windows Installation Guide

Quick Scan Features Setup Guide. Scan to Setup. See also: System Administration Guide: Contains details about setup.

ERserver. iseries. Work management

WebSpy Vantage Ultimate 2.2 Web Module Administrators Guide

Customer Tips. Xerox Network Scanning HTTP/HTTPS Configuration using Microsoft IIS. for the user. Purpose. Background

How To Enable A Websphere To Communicate With Ssl On An Ipad From Aaya One X Portal On A Pc Or Macbook Or Ipad (For Acedo) On A Network With A Password Protected (

Digital Certificate Manager Setup

FileMaker Server 7. Administrator s Guide. For Windows and Mac OS

enicq 5 System Administrator s Guide

IBM Systems Director Navigator for i5/os New Web console for i5, Fast, Easy, Ready

Xerox Multifunction Devices. Verify Device Settings via the Configuration Report

MAS 90. Installation and System Administrator's Guide 4WIN /04

Implementing Secure Sockets Layer (SSL) on i

NSi Mobile Installation Guide. Version 6.2

Table of Contents. CHAPTER 1 About This Guide CHAPTER 2 Introduction CHAPTER 3 Database Backup and Restoration... 15

System i Access for Web Configuring an Integrated Web Application Server Instance

Ingenious Testcraft Technical Documentation Installation Guide

User guide. Business

IBM i Version 7.2. Security Service Tools

GoAnywhere Director to GoAnywhere MFT Upgrade Guide. Version: Publication Date: 07/09/2015

ERserver. iseries FTP

Employee Quick Reference Guide

STATISTICA VERSION 10 STATISTICA ENTERPRISE SERVER INSTALLATION INSTRUCTIONS

ERserver. iseries. TFTP server

Security Digital Certificate Manager

Security Service tools user IDs and passwords

Installation Instruction STATISTICA Enterprise Server

Bosch ReadykeyPRO Unlimited Installation Guide, product version 6.5. This guide is item number DOC , revision 2.029, May 2012.

Sage ERP MAS 90 Sage ERP MAS 200 Sage ERP MAS 200 SQL. Installation and System Administrator's Guide 4MASIN450-08

Networking File Transfer Protocol

Quick Scan Features Setup Guide

Installing and Configuring vcloud Connector

Deploying Intellicus Portal on IBM WebSphere

User Manual. Onsight Management Suite Version 5.1. Another Innovation by Librestream

IBM i Version 7.2. Security Single sign-on

DigiDelivery Client Quick Start

HP A-IMC Firewall Manager

Pro-Watch Software Suite Installation Guide Honeywell Release 4.1

HP IMC Firewall Manager

Installing and Configuring DB2 10, WebSphere Application Server v8 & Maximo Asset Management

Exploiting the Web with Tivoli Storage Manager

FileMaker Server 11. FileMaker Server Help

IQSweb Reference G. ROSS Migration/Registration

Copyright International Business Machines Corporation All rights reserved. US Government Users Restricted Rights Use, duplication or disclosure

Lepide Active Directory Self Service. Configuration Guide. Follow the simple steps given in this document to start working with

An Introduction To The Web File Manager

DiskPulse DISK CHANGE MONITOR

Portions of this product were created using LEADTOOLS LEAD Technologies, Inc. ALL RIGHTS RESERVED.

Xerox EX Print Server, Powered by Fiery, for the Xerox 700 Digital Color Press. Printing from Windows

TOSHIBA GA Printing from Windows

FileMaker Server 12. FileMaker Server Help

Xerox 700 Digital Color Press with Integrated Fiery Color Server. Utilities

Installation and Setup Guide

WebLogic Server 6.1: How to configure SSL for PeopleSoft Application

Network Scanner Tool R3.1. User s Guide Version

BlackBerry Enterprise Service 10. Secure Work Space for ios and Android Version: Security Note

BusinessObjects Enterprise XI Release 2

Working With Virtual Hosts on Pramati Server

+27O.557+! RM Auditor Additions - Web Monitor. Contents

Out n About! for Outlook Electronic In/Out Status Board. Administrators Guide. Version 3.x

2. Installation Instructions - Windows (Download)

Kaseya Server Instal ation User Guide June 6, 2008


SecureAware on IIS8 on Windows Server 2008/- 12 R2-64bit

Security Digital Certificate Manager

Install SQL Server 2014 Express Edition

Step-by-Step Guide for Creating and Testing Connection Manager Profiles in a Test Lab

Customer Tips. Xerox Network Scanning TWAIN Configuration for the WorkCentre 7328/7335/7345. for the user. Purpose. Background

Tenrox. Single Sign-On (SSO) Setup Guide. January, Tenrox. All rights reserved.

FileMaker Server 13. FileMaker Server Help

Sametime Gateway Version 9. Deploying DMZ Secure Proxy Server

Portions of this product were created using LEADTOOLS LEAD Technologies, Inc. ALL RIGHTS RESERVED.

Networking Security IP packet security

technical brief browsing to an installation of HP Web Jetadmin. Internal Access HTTP Port Access List User Profiles HTTP Port

Avatier Identity Management Suite

Password Reset Server Installation Guide Windows 8 / 8.1 Windows Server 2012 / R2


ERserver. iseries. Printing

IBM Tivoli Composite Application Manager for Microsoft Applications: Microsoft Internet Information Services Agent Version Fix Pack 2.

Fiery EX4112/4127. Printing from Windows

Installing Management Applications on VNX for File

How To Create An Easybelle History Database On A Microsoft Powerbook (Windows)

DocuPrint C3290 FS Features Setup Guide

FileMaker Server 15. Custom Web Publishing Guide

Improved document archiving speeds; data enters the FileNexus System at a faster rate! See benchmark test spreadsheet.

DSI File Server Client Documentation

Using Microsoft s CA Server with SonicWALL Devices

Reference and Troubleshooting: FTP, IIS, and Firewall Information

HP Web Jetadmin Database Connector Plug-in reference manual

Docufide Client Installation Guide for Windows

Installing SQL Express. For CribMaster 9.2 and Later

VERITAS Backup Exec TM 10.0 for Windows Servers

Transcription:

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

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

Copyright International Business Machines Corporation 1998, 2000. All rights reserved. US Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

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 Copyright IBM Corp. 1998, 2000 iii

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 iv AS/400e: TCP/IP Services and Applications Web server (HTTP)

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. Copyright IBM Corp. 1998, 2000 1

2 AS/400e: TCP/IP Services and Applications Web server (HTTP)

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 v v v 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. The simple and advanced Search forms now allow you to specify fields that are associated with the index being searched. Radio buttons have been added on Build a document list to allow the request to be processed either as an immediate or background task. A new Delete document list form allows you to delete a document list. 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. Copyright IBM Corp. 1998, 2000 3

4 AS/400e: TCP/IP Services and Applications Web server (HTTP)

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 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. 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. Copyright IBM Corp. 1998, 2000 5

6 AS/400e: TCP/IP Services and Applications Web server (HTTP)

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 v v v v v IBM HTTP Server (5679 DG1) 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) Application Development ToolSet/400 (5769 PW1) is optional but preferred for creating your own home page on your AS/400. 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. 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). 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). Copyright IBM Corp. 1998, 2000 7

8 AS/400e: TCP/IP Services and Applications Web server (HTTP)

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. Copyright IBM Corp. 1998, 2000 9

10 AS/400e: TCP/IP Services and Applications Web server (HTTP)

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. Copyright IBM Corp. 1998, 2000 11

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. 12 AS/400e: TCP/IP Services and Applications Web server (HTTP)

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. Copyright IBM Corp. 1998, 2000 13

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. 14 AS/400e: TCP/IP Services and Applications Web server (HTTP)

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 v v Having the ADMIN server instance start automatically whenever you use the Start TCP/IP (STRTCP) command Configuring for HTTP secure transactions (SSL) 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. Chapter 6. Getting started with HTTP Server 15

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. 16 AS/400e: TCP/IP Services and Applications Web server (HTTP)

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 Chapter 6. Getting started with HTTP Server 17

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 Creating a home page 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. 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 18 AS/400e: TCP/IP Services and Applications Web server (HTTP)

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: v namefmt 1 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. Chapter 6. Getting started with HTTP Server 19

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 SAMPLE and 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. 20 AS/400e: TCP/IP Services and Applications Web server (HTTP)

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 Copyright IBM Corp. 1998, 2000 21

Creating a server instance Deleting a server instance 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. 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. 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. 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. 1. Click Server Instances. 22 AS/400e: TCP/IP Services and Applications Web server (HTTP)

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. 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 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. Chapter 7. Supporting multiple Web sites on the HTTP Server 23

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, ormonitor, as desired. There are several tasks that require you to use this form to restart or stop and start the instance involved. 24 AS/400e: TCP/IP Services and Applications Web server (HTTP)

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? Copyright IBM Corp. 1998, 2000 25

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. 2. Click Request Processing. 3. Click Request routing. 4. Complete the Request routing form that is provided. 5. Click the Apply button. 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 /) 26 AS/400e: TCP/IP Services and Applications Web server (HTTP)

v v v v v QOpenSys QSYS.LIB QDLS QOPT 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) 2. 3. 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. 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) 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. Chapter 8. Storing and serving Web pages 27