Communicator HP e3000 MPE/iX Express 2 Based on Release 6.5
> Chapter 3 Technical ArticlesApache 1.3.9 for MPE/iX |
||||||||||||||||
|
Commercial Systems Division Apache 1.3.9 for MPE/iX is based on Apache 1.3.9 from the Apache Software Foundation. It is an upgrade to Apache 1.3.4 for MPE/iX with added enhancements such as DSO capability, an extended API (EAPI), and additional compiled-in modules. Release InformationApache 1.3.9 for MPE/iX is available as an individual patch for 6.0 or 6.5 from the HP Response Center. It is not part of the Express 2 release. System Requirements and PatchesApache 1.3.9 for MPE/iX requires the following:
SupportApache 1.3.9 for MPE/iX is supported through the HP Response Center as part of MPE FOS support. Product DescriptionApache 1.3.9 for MPE/iX is an upgrade to base version Apache 1.3.9 and also includes major new features and functionality. These new features include:
Dynamic Shared Objects (DSOs)DSOs are add-on modules that extend the functionality of Apache. These module are loaded at Apache startup (and at restart, i.e. kill -HUP) into Apache process space. These modules exist separately from the Apache binary and allow a user to add new functionality as they desire. This DSO feature keeps Apache memory usage low while still making new features available. It also gives flexibility in Apache installations. No recompilation of Apache is necessary to use DSOs. However, DSOs require a DSO-enabled Apache, such as Apache1.3.9. HP currently provides a DSO for Java Servlets. This DSO can be installed to run with Apache 1.3.9 or HP Webwise Secure Web Server. Users can also create their own DSOs. A DSO is an Apache module, similar to the modules that are compiled into the Apache binary. DSOs can be written in C or perl. To write a DSO in C, /APACHE/PUB/libexec/mod_example.c file is a useful template. Mod_example.c compiles into a working DSO by compiling it as a shared library, mod_example.so. DSOs can also be created by using the bin/apxs utility ("Apache eXtenSion" tool). If creating a DSO using bin/apxs, the -g and -n options will create a module skeleton and corresponding Makefile. This is useful as the Makefile will contain all the necessary MPE compile options. Details on using bin/apxs are found on the apxs manual page on your server in /APACHE/PUB/manual/dso.html. Please note that apxs is a perl script and perl is not distributed with FOS. It is available as downloadable software from http://jazz.external.hp.com but is not supported by HP. DSOs are configured in conf/httpd.conf by specifying the AddModule and LoadModule directives:AddModule mod_example.c LoadModule example_module libexec/mod_example.soThe LoadModule directive takes two arguments. The first is the name of the module to load. This is the module's structure name from the source file (e.g. mod_example.c). The second argument is the path to the shared object file to load. The path can be relative to the server root (/APACHE/PUB) as shown here, or it can be an absolute path. EAPIApache 1.3.9 is built with an extended set of Apache APIs. This means that Apache also expects these EAPIs to be built into any module it calls, including DSOs. This EAPI feature was included in Apache 1.3.9 so that the same DSOs could be used by both Apache and WebWise without the need to recompile. When creating DSOs, you must compile with the -DEAPI option. This will include the necessary EAPI header files. These header files are part of the Apache 1.3.9 distribution and reside in /APACHE/PUB/include. The /APACHE/PUB/include directory also contains the README.EAPI file. The README.EAPI file describes the functionality that is available with EAPI such as more features in the mod_rewrite, mod_status, and mod_proxy modules. DSOs created with the -g -n options of bin/apxs will have a Makefile generated with the -DEAPI option automatically included.Additional ModulesThe Apache 1.3.9 for MPE/iX contains all the modules in Apache 1.3.4 for MPE/iX as well as five additional modules. To view the complete set of modules, execute the Apache binary with the "-l" option: shell/iX>/APACHE/PUB/HTTPD -l The modules that are new to Apache 1.3.9 are:
Apache 1.3.9 Base FeaturesAn overview of the new Apache 1.3.9 base features is described in the online Apache newsletter, Apacheweek, at http://www.apacheweek.com/issues/99-08-20. These new features include the ability to better handle many virtual hosts, conformance to the latest draft for Digest Authentication, and the abiltiy to customize the name of a cookie.File Creation MaskA file creation mask, umask007, was added to the startup stream job, JHTTPD, for increased security. With this change, files created by Apache will prohibit access by anyone outside of the Apache account. Files in this category are log files, files created in the proxy directiory (when Apache is used as a proxy server) and any files created by CGI scripts.Version IdentificationThis version of Apache has the product number A.01.00 which is viewable by running the Apache binary with the "-v" option shell/iX> /Apache/PUB/HTTPD -v Server version: Apache/1.3.9 (HP MPE/iX A.01.00) Server built: Oct 23 2000 13:41:28 Product InstallationApache 1.3.9 for MPE/iX is installed by following the installation instructions that come with the patch. The product will be installed in /APACHE/PUB and will overlay any previous versions of Apache installed in that location. Product ConfigurationThe /APACHE/PUB/conf directory contains the Apache configuration files. After installation, you need to create your own copies of these. The httpd.conf.sample file was derived from the httpd.conf.default file with modifications for Apache on MPE/iX. Make sure you are logged on as MGR.APACHE before beginning configuration, :HELLO MGR.APACHE :xeq sh.hpbin.sys -L shell/iX>cd /APACHE/PUB/conf shell/iX>cp httpd.conf.sample httpd.conf shell/iX>cp mime.types.default mime.types shell/iX>cp magic.default magicThe access.conf.default file and the srm.conf.default file need not be copied. These files were used in earlier versions of Apache but their content is now included in the httpd.conf file. However, if these files exist, Apache will read and process them after processing the conf/httpd.conf file. httpd.confEdit the httpd.conf file for your own server. You may also wish to change default values. For information about configuration directives, visit the online Apache documentation at http://www.apache.org/docs. Httpd.conf is a bytestream file. If you have Samba installed, you can edit httpd.conf on your PC.Modify the following httpd.conf directives by replacing "yourserver.com" with your own server name:
JHTTPD Job Stream FileThe startup job stream file, JHTTPD, is provided as a sample file to prevent overwriting JHTTPD on an existing installation. For new installations, copy the sample file then change the timezone variable, TZ, to your own timezone. Note that the file mask is now set in this file. JHTTPD is an MPE, fixed-record filetype which can be edited with any MPE text editor.shell/iX>cd /APACHE/PUB shell/iX>cp JHTTPD.sample JHTTPD shell/iX>cat JHTTPD !job jhttpd,www.apache,pub;outclass=,2 !setvar TZ 'PST8PDT' !xeq sh.hpbin.sys \ "-c 'umask 007;./HTTPD -f /APACHE/PUB/conf/httpd.conf'" !eoj Updating from Earlier VersionsIf you are updating from earlier versions of Apache, rename or remove the existing log files after stopping Apache. This way, Apache can create fresh log files with the correct ownership and permissions. Startup errors will also be easier to detect. Make sure to stop Apache before renaming or trying to remove these files. Apache will continue to hold log files open and write to them while it is running.shell/iX>kill `cat /APACHE/PUB/logs/httpd.pid shell/iX>cd /APACHE/PUB/logs shell/iX>mv error_log error_log134 shell/iX>mv access_log access_log134Apache 1.3.9 runs as WWW.APACHE. If your previous version of Apache was running as a different user, you must change your documents (.html, .txt, etc.) to be readable by WWW.APACHE, your log files must be writeable by WWW.APACHE, and your CGI must be executable by WWW.APACHE. The Apache Troubleshooting Guide, http://jazz.external.hp.com/src/apache/troubleshoot.txt, has examples on how to set these permissions. File permissions will not be updated by the Apache 1.3.9 installation unless patch MPELX37 is installed. If your current version of Apache is running successfully as WWW.APACHE, such as Apache 1.3.4, update to Apache 1.3.9 by following the installation and configuration instructions as given. File permissions should not be a problem. Running ApacheStartupApache can be started from either the CI or the POSIX shell.:stream jhttpd.pub.apache or shell/iX>callci stream JHTTPD.PUB.APACHE Verifying StartupSuccessful installation and startup of Apache 1.3.9 can be verified by
shell/iX>cd /APACHE/PUB/logs shell/iX>tail error_logIf the JHTTPD job is running, try accessing Apache's home page, http://yourserver.com If Apache does not start, try consulting the Apache Troubleshooting Guide for tips on debugging the problem. ShutdownApache can be shut down by issuing an :ABORTJOB or kill. Using kill (which defaults to kill -TERM) is the preferred method since it uses Apache's internal routines to clean up open resources and shut down gracefully. Apache can be restarted by issuing a kill -HUP. A restart will cause Apache to reread its configuration files without having to stop and restream the Apache job stream file. Restart is useful for making configuration changes without disrupting web users. After a restart, Apache continues running with the new configuration settings. To use kill requires the use of one of the following:
Additional ResourcesFor general Apache information, the official Apache web site, http://www.apache.org, contains documentation on configuration and functionality, FAQs, a list of books, and much more. Apacheweek, http://www.apacheweek.com, is a weekly digest of Apache activities, book reviews, and in-depth articles on Apache features. After installing Apache, your manual directory contains a User's Guide, Reference Manual, and other information which pertains to the installed version of Apache: http://yourserver.com/manual. For writing DSOs, a good reference is Writing Apache Modules with Perl and C, by Lincoln Stein and Doug MacEachern, published by O'Reilly & Associates, ISBN 1-56592-567-X. For MPE-specific information on Apache, the following documents are available on HP's online document site, http://docs.hp.com
|