| United States-English |
|
|
|
![]() |
Communicator HP e3000 MPE/iX Express 2 Based on Release 6.5: HP e3000 MPE/iX Computer Systems > Chapter 3 Technical ArticlesApache 1.3.9 for MPE/iX |
|
By Barbara Dubbert 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. Apache 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. Apache 1.3.9 for MPE/iX requires the following:
It is highly recommended that you also install the latest Network Services Transport patch (NSTxxxxx). The following patches fix a corruption problem when displaying large CGI output over a slow connection:
The following patches are optional. You may want to install one or more of these:
Apache 1.3.9 for MPE/iX is supported through the HP Response Center as part of MPE FOS support. Apache 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:
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 The 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. Apache 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. The 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:
mod_proxy - With this module, Apache can act as a proxy server, or intermediary, when clients make web server requests. Instead of a client making a direct request to a web server, the client makes a request to the proxy server. The proxy server then makes the actual request to the web server. The web server responds to the proxy server who then forwards the response back to the original client. The proxy server can also cache documents and resources that pass through the proxy interface. If the proxy server has a copy of a requested document, it can return the copy immediately without contacting the web server. mod_rewrite - Mod_rewrite is a very powerful module for translating requested URLs to new addreses on the fly. The URL manipulations can depend on various tests, for example server variables, environment variables, HTTP headers and time stamps. New translation rules can be added to existing ones. Because of this module's functionality and flexibility, it is complex to use. Extensive documentation on mod_rewrite is available from the official Apache web site, http://www.apache.org. mod_digest - This module provides a method of authentication, called Digest Authentication. Although Digest Authentication is not currently used by web browsers on the market, it is available to use whenever web browsers adopt this type of authentication. Web browsers currently use Basic Authentication. mod_vhost_alias - Mod_vhost_alias simplifies the use of large numbers of virtual hosts by replacing static virtual host configurations (<VirtualHost>) with dynamic configuration. With this feature, adding more virtual hosts does not require reconfiguring or restarting Apache. This feature can make Apache startup faster. It also uses less memory because the httpd.conf file is smaller. mod_so - This module implements the Dynamic Shared Object (DSO) mechanism for loading executable code and modules into Apache at start-up or restart. An 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. A 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. This version of Apache has the product number A.01.00 which is viewable by running the Apache binary with the "-v" option
Apache 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. The /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 The 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. Edit 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:
The 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 !job jhttpd,www.apache,pub;outclass=,2 If 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` Apache 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. Apache can be started from either the CI or the POSIX shell. :stream jhttpd.pub.apache Successful installation and startup of Apache 1.3.9 can be verified by
To check the content of the error_log, shell/iX>cd /APACHE/PUB/logs If 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. Apache 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:
To shut down Apache: :ABORTJOB JHTTPD,WWW.APACHE or shell/iX>kill `cat /APACHE/PUB/logs/httpd.pid` or :xeq sh.hpbin.sys "-c 'kill `cat /APACHE/PUB/logs/httpd.pid`'" To restart Apache: shell/iX>kill -HUP `cat /APACHE/PUB/logs/httpd.pid` or :xeq sh.hpbin.sys "-c 'kill -HUP `cat /APACHE/PUB/logs/httpd.pid`'" For 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
|
||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||