960 likes | 1.76k Views
Getting Started with IBM HTTP Server Powered by Apache and CGI. Chris Adair Information Systems Director - National Envelope cadair@natenv.com Treasurer – Metro Midrange Systems Association treasurer@metromidrange.org. iSeries GUI Debugger. Chris Adair
E N D
Getting Started with IBM HTTP Server Powered by Apache and CGI Chris Adair Information Systems Director - National Envelope cadair@natenv.com Treasurer – Metro Midrange Systems Association treasurer@metromidrange.org
iSeries GUI Debugger Chris Adair Information Systems Director - National Envelope cadair@natenv.com Treasurer – Metro Midrange Systems Association treasurer@metromidrange.org
Disclaimer • Note: In this presentation, when we refer to the eServer i5 or iSeries primary operating system, we refer to OS/400, even though the operating system name has changed to i5/OS in V5R3. If it is not explicitly stated otherwise, the term OS/400 also refers to i5/OS.
HTTP Server And CGI • How many of you have a HTTP Server running on a Systemi? • How many of you have CGI running on that server?
What is an HTTP Server? • A computer that is responsible for accepting HTTP requests from clients, which are known as Web browsers, and serving them HTTP responses along with optional data contents, which usually are Web pages such as HTML documents and linked objects (images, etc.).
Why the Apache HTTP Server? • Most popular Web server in the industry • 70% of the web sites on the internet are using Apache ( 2005 Netcraft Web Server Survey) • Easily maintainable • Many Apache skills in the marketplace • Scalable • Handles the small usage sites to the well traveled sites • Affordability • Most likely, you already have everything you need.
What Do You Need? • 5722–DG1 IBM HTTP Server for iSeries • HTTP Server (original) - Only until OS/400 V5R2 • HTTP Server Powered by Apache • Net.Data • Webserver Search Engine and Crawler • Apache Software Foundation’s Jakarta Tomcat • Highly Available HTTP Server • Triggered Cache Manager • 5722-TC1 TCP/IP Utilities • 5722-JV1 Java Developer Kit 1.3
The Admin Server • A HTTP Server used to manage Web Servers • To Start the Admin Server • iSeries Navigator • Under Network > Servers > TCP/IP: Right Click HTTP Administration • Command • STRTCPSVR SERVER(*HTTP) HTTPSVR(*ADMIN)
Accessing the Admin Server • The Admin Server “listens” on port 2001 for normal HTTP traffic • Using a browser, enter this URL • http://your_system:2001/ • The Admin Server is secured by i5/OS user profiles • User profiles must have *IOSYSCFG and *ALLOBJ special authority to perform configuration activities • IBM does not recommend using QSECOFR
Now that the Admin Server is started, we can use the wizard to create a new IBM HTTP Server Powered by Apache
Create a New HTTP Server • From the Admin Server, click IBM Web Administration for iSeries • When the HTTPAdmin page is displayed, be sure to select the “Manage” and “All Servers” tabs • From the navigation pane on the left, click “Create HTTP Server”
Step 1: Server Name and Desc. • On the Create HTTP Server pane, key a name and description for your server. • On the bottom of the page, click “Next”.
Step 2: Specify Root Directory • The root directory is where the configuration files and log files are kept. • This will be in the Integrated File System. • Typically, this will just be defaulted, and there’s nothing to key. • On the bottom of the page click “Next”.
Step 3: Specify Document Root • The document root directory is where all the servable files are kept. • You will put all your HTML’s, images, etc... under this directory or subdirectories • Typically, this will just be defaulted, and there’s nothing to key. • On the bottom of the page click “Next”.
Step 4: Specify IP Addresses / Port • Typically, you will want all IP addresses • Key the desired port number • The HTTP default is 80 • Do not use a port number already in use • On the bottom of the page click “Next”.
Step 5: Access Log • You can indicate whether or not you want an access log. • An access log will keep track of who is making requests of your server. • The error log will automatically be created, regardless of this selection. • On the bottom of the page click “Next”.
Step 6: Specify Time to Keep Logs • New log files will be created on a daily basis to prevent any one file from becoming to large. • Specify whether or not to keep log files, both error and access logs. And, how many days to wait before they’re purged • On the bottom of the page click “Next”.
Step 7: Summary Screen • The wizard displays all the information from the prior steps for a final review. • If any changes are needed, click the “Back” button. • If no changes are needed, and your ready to create the server, click “Finish”.
Back To The Admin Server • Once completed, the Admin Server is displayed with the new server. • We can continue to make configuration changes, or start the server and give it a test, • We’ll start the server by clicking the green arrow.
Here’s What We Added • Some IFS Directories/Files to hold our configuration and content • 5 Jobs running in the QHTTPSVR subsystem • Let’s take a look……
Create Your Own index.html • Using your favorite HTML editor, make your own index.html. • I used IBM Rational Software • Gave my page a title and image • Moved it to the “HTDOCS” directory under APACHE01 in the IFS
Add Some Directories • I added some links for a few locations • Those links need to direct us to a directory under the APACHE01, where I plan to put some month end reports, stored as PDF’s • But first, we’ll need to change the configuration of the server to allow directory listings.
Global Configuration • I added all my directories under “Global Configuration”. • Now, I need to go to each directory location and specify “Directory Handling” and “Security”