The 2.0.x mod_proxy module included both proxy and cache functionality.These functionalities are separated by HP-UX Apache-based Web Server. The mod_proxy module proxying.performs the function
mod_cache implements an RFC 2616 compliant HTTP content cache that can be used to cache either local or proxied content. mod_cache requires the services of one or more storage management modules. Two storage management modules are included in HP-UX Apache-based Web Server:
A disk-based storage manager that is generally used for proxy caching. For a cached file, the proxy server serves the request directly and avoids the overhead of sending the request on to the web server.
An mmap-based and/or file handle-based storage manager that allows the server file system to control whether the file is in memory or not. This replaces all the functionality of the 2.0.x module, mod_mmap_static.
An in-memory based storage manager, primarily useful for caching local content.
7.2.2 Migrating How Documents are Cached by Proxy Servers
If it is set, the CacheNegotiatedDocs directive allows content-negotiated documents to be cached by proxy servers. Suite,Earlierthe CacheNegotiatedDocs did not take an argument; it was activated by the presence of the directive by itself.
In HP-UX Web Server Suite, the CacheNegotiatedDocs directive takes the argument on or off. In the httpd.conf file, replace existing instances of CacheNegotiatedDocs with CacheNegotiatedDocs on.
7.3 Migrating Security
To migrate Security from HP Web Server Suite 2.x to HP-UX Web Server Suite 3.x, see the following sub-sections:
7.3.1 Migrating SSL
In the 2.0.x version of HP Apache-based Web Server, SSL configuration information was provided in the httpd.conf file. In the HP-UX Apache-based Web Server, SSL configuration information has been moved to httpd-ssl.conf.
To migrate SSL from 2.0.x to 3.x, you must move your customized SSL configuration information from the 2.0.x version of the /opt/hpws/apache/conf/httpd.conf file to /opt/hpws22/apache/conf/extra/httpd-ssl.conf.
In addition, edit your ServerName directives by adding a colon and port number after each ServerName directive. Also, replace your SSL logging directives with the Apache logging directives. See the following example.
SSL in HP Apache 2.0.x:
SSL was enabled in 2.0.x with the following entry in /opt/hpws/apache/conf/httpd.conf.
SSL Logging has its own directives in /opt/hpws/apache/conf/httpd-ssl.conf.
SSLLog /opt/hpws/apache/logs /ssl _engine _log
SSL in HP-UX Apache-based Web Server: You can no longer proxy through SSL.
SSL is enabled with the following entry in /opt/hpws22/apache/conf/extra/httpd-ssl.conf.
## SSL Virtual Host Context ##
# General setup for the virtual host
ServerName yourserver.com: 443
SSL logging uses the Apache directives in /opt/hpws22/apache/conf/extra/httpd-ssl.conf.
7.3.2 Migrating Chroot
Chroot remains unchanged between HP Apache 2.0.x and HP-UX Web Server Suite 3.x.
7.4 Migrating Scripting Modules
To migrate Scripting Modules from HP Apache 2.0.x to HP-UX Apache-based Web Server, see the following sub-sections:
Migrating Server-Side Includes
7.4.1 Migrating PHP
PHP in HP-UX Apache-based Web Server:
To enable PHP, uncomment the following lines or sureenthat they are present in /opt/hpws22/apache/conf/httpd.conf:
LoadModule php5_module modules/libphp5.so
SetOutputFilter PHP SetInputFilter PHP
To use PATH_INFO, you must explicitly set the AcceptPathInfo, directive otherwise a 404 response is returned. In 2.0, PATH_INFO is enabled by default, therefore a PHP script /script.php is invoked if a request is made to the location /script .php/foo/bar, passing a PATH_INFO of /foo/bar to the script.
7.4.2 PHP Oracle support in HP-UX Apache-based Web Server
PHP Oracle support is new feature in HP-UX Web Server Suite.
To enable PHP Oracle, edit the file /opt/hpws22/apache/bin/apachectl. Uncomment the four individual lines that begins with export:
The mod _cgid module is a new feature inthe HP-UX Apache-based Web Server.
Forking a process from a multi-threaded server can be an expensive operation because the new process replicates all the threads of the parent process. toT avoid incurring this expense on each CGI invocation, the mod_cgidmodule, in the HP-UX Apache-based Web Server, creates an external daemon that is responsible for forking child processes to run CGI scripts. The main server communicates with this daemon using a UNIX domain socket.
At the user level, this module is identical in configuration and operation to the mod_cgi. module The only exception is the additional directive Scriptsock, which provides the name of the socket to use for communication with the cgid daemon.
CGI in HP Apache 2.0.x:
CGI in HP-UX Apache-based Web Server:
The cgid daemon is activated inthe HP-UX Apache-based Web Server by default. The Scriptsock directive is used to set the UNIX socket to communicate with cgid.
7.4.5 Migrating Server-Side Includes (SSI) In HP Apache 2.0.x:
In 2.0.xHP Apache ,the Server-Side Includes were provided by the mod_include. module Any document with handler of “server-parsed” was handled by mod_include, if the Includes option was set. IfAlso, i documents containing the server-side include directives had the extension.shtml, the following directives made Apache parse them and assign the resulting document the mime type of text/html:
The Server-Side Includes provided by mod include are now implemented using the new filter systemrather than as a handler. This provides much more power and flexibility, but requires the use of the SetOutputFilterto activate server-parsed content. If you were using AddHandler server-parsed.shtml in HP Apache 2.0.x, you can get similar functionality in HP-UX Apache-based Web Server by using,
7.5 Migrating Java
HP Apache 2.0.x has two servlet containers for running java server applications. One container is JServ and the other is Tomcat. In 2.0.x, modjserv connects Apache to JServ or Tomcat. In 2.0.27, modjk is also available to connect Apache to Tomcat. Migrating from 2.0.x to HP-UX Apache-based Web Server is, mainly, a path change.The HP-UX Apache-based Web Server does not support the modjserv connector or the JServ container.
7.5.1 Migrating Tomcat with modjserv to Tomcat with modjk
The new HP-UX Tomcat-based Servlet Engine uses Tomcat 126.96.36.199. for more information, see /op/hpws/hp_docs/tomcat/tomcat.migration.guide.
In 2.0.x, Tomcat uses modjserv or modjk as the connector while in 2.x Tomcat uses modjk and modjk2.
2.0.x with Tomcat (modjserv) /opt/hpws/apache/conf/httpd.conf
2.0.27 with Tomcat (modjk) /opt/hpws/apache/conf/httpd.conf
worker.ajp13 .host=localhost worker. ajp13.type=ajp13
In the 2.x workers . properties file:
Web application contexts
In the 2.0.x server.xml: file, enter ="/examples"
In the 2.0.26 apps-examples.xml: file, enter
In the 2.x server. Xml file, enter:
G) Handling .jsp files
In the 2.0.x tomcat.conf:conf file, enter
ApJServMount default /root AddType text/jsp .jsp
AddHandler jserv-servlet .jsp
In 2.0.26 and 2.x:
Tomcat is a servlet/jsp container; therefore, web applications, such as "examples", handle jsp'sJSP properly. For instance, Apache passes URIs beginning with /examples to Tomcat and Tomcat handles the *.jsps. In Tomcat, the JSP interceptor handles the loading of JSP pages. Its behavior can be customized in the server.xml file.
Listed below is an example, with the procedure, to enable the following URL to work with "HelloWorldExample" servlet: yourserver.com/my_app/HelloWorldExample
A) All your java classes are in:
Create a myapp directory inside Tomcat’s /opt/hpws22/tomcat/webapps:
$ cd /opt/hpws22/tomcat/webapps
$ mkdir myapp
$ mkdir myapp/WEB-INF
Create a symbolic link so that servlets in /my_servlets are visible inside WEB-IN F:
$ cd /opt/hpws22/tomcat/webapps/myapp/WEB-INF $ ln -s /my_servlets classes
Create a web.xml file in /opt/hpws22/tomcat/webapps/myapp/WEB-INF with the following contents:
"http://java.sun.com/j2ee/dtds/web-app 2 3.dtd">
Restart Tomcat. You should be able to access servlets by using http://yourserver.com:8081/myapp.
5. To access servlets through Apache, map the Tomcat context to Apache. Edit /opt/hpws22/apache/conf/httpd.the conf file and uncomment the
Include /opt/hpws22/tomcat/j k/apache2/j k/mod _j k. conf
Edit /opt/hpws22/tomcat/jk/apache2/mod _jk.conf and add:
JkMount /servlet ajp13 JkMount /servlet/* ajp13
6 Add servlets to CLASSPATH.
Because Tomcat does not read the CLASSPATH environment variable, you must perform the following:
Below CATALINA _OPTS=" -XdoCloseWithReadPending", add the following as a single line:
CATALINA _OPTS=" $CATALINA _OPTS -
Note: You can add /my_servlets to the CLASSPATH by setting the following system property: org.apache.tomcat.apps.classpath
7. Verify the following:
Stop and start tomcat:reTomcat
Stop and start apache:A
Enterthe URL in browser yourserver.com/myapp/
8. CreateIf the previous step fails, ca test environment. If you do not have your own servlets, you can set up a test environment, based on the servlets available in Tomcat., by following the procedure below:
/my_servlets is the actual location of the servlets.
If you prefer, you can use the name "/my _servlets" for both. instances
c. This scenario assumes that the servlets do not need to be reloadable. In other words, if you recompile the servlet, you will need to restart Tomcat for the changes to be recognized. Servlets can be made reloadable by referencing them in /opt/hpws22/tomcat/webapps/ROOT/WEB-INF/web . xml and creating individual symbolic links to the classes in /opt/hpws22/tomcat/webapps/ROOT/WEB-INF/classes.
7.5.3 Methods to Enable Servlets in Tomcat
The class-loader-howto.html of tomcat-5.5.26 -doc refers to configuring what classes are available and the scope of their availability. Tomcat uses some classes (in particular, xml parsers) that applications may want to replace with other classes. toT avoid conflicts, Tomcat separates Tomcat-required classes from application-required classes. To accomplish this, your CLASSPATH environment variable is ignored by Tomcat.
The following summarizes processes to make your classes available to Tomcat and to each other.
Enabling Classes Based on Scope of Class Availability:
Classes that are used in a particular web application.
Classes that are shared by all web applications. *.jar files
Place the jar files in the following directory: /opt/hpws /tomcat/ shared/lib
/opt/hpws /tomcat/ shared/classes
7.6 Other Migration Tasks
For additional migration tasks:, see the following sub-sections
Migrating the Selection of Server Type
7.6.1 Migrating the Selection of Server Type In HP Apache 2.0.x:
In 2.0.x, the ServerType directive could be set to one of the following two values in the /opt/hpws/apache/conf/httpd.conf file:
In HP-UX Apache-based Web Server:
In Apache 2.x, the ServerType directive has been removed and the server type is selected using an MPM. HP-UX Apache-based Web Server integrates the worker MPM, which supports only one behavior, the standalone. This behavior does not require any directive. There is, currently, no MPM designed by ASF to be launched by inetd.
188.8.131.52 Changed “Apache Modules” screen in HP-UX Webmin-based Admin
The fourth section, Other, is blank in this example but will contain other modules you might add, that are not part of the HP-UX Apache-based Web
Server distribution. For example, if you add a personal module
The Apache Modules screen is grouped into five categories:
Statically linked-in modules
Standard Apache modules (DSO)
Standard HP-UX Apache Add-on modules (DSO)
5) Add new modules
The first section contains modules that are always loaded and are not configurable.
The modules in the second section are available in the standard Apache distribution.
The third set of modules is not in Apache’s standard distribution but has been included in the HP-UX Apache-based Web Server. These modules include auth_ldap, modjk, mod_perl and mod_php4.
mod_personal, it will be displayed in this section. The final section is where you can add your own modules. These input boxes require the Module Name and the Location of the Module. This uses the LoadModule directive. For example, foo_module and modules/mod_foo are the two required fields.
Note for mod_ssl and auth_ldap:
Since the configuration directives for mod_ssl and auth_ldap are not in the standard configuration file (conf/httpd.conf), these two modules are enabled differently. Instead, the directive Include path/to/config_file is uncommented to load the module. This means that when mod_ssl is enabled, the directives in the conf/ssl.conf file are automatically included. Likewise, for auth_ldap, the directives in the conf/ldap.conf file are automatically included.
Note for mod_ssl:
If you change Apache settings when the mod_ssl module is loaded, you must stop and then restart Apache for these settings to take effect. If the mod_ssl module is not loaded, a simple restart should work.
184.108.40.206 New “Filters” screen in HP-UX Webmin-based Admin
The HP-UX Apache-based Web Server Filters screen allows configuration of filter directives.
For references on filters, see Writing 3.x Modules - Bibliography.
220.127.116.11 New “Generating Certificates and Keys” in HP-UX Webmin-based Admin
This screen allows you to generate keys and certificates for your server or for your own self-signed Certificate Authority (CA). You can use a previously generated CA certificate and key to generate new Server certificates or Keys.
To generate only a CA Key, specify the CA Key File and Key Size and click Make Certs at the bottom of the screen. If there is already a file with the same name at that location and you wish to overwrite it, check the box labeled Overwrite existing Key, Certificate and Certificate Request files.
Creating a CA Certificate Request depends on the CA Key, so both file locations must be specified, and the Information for the Request must be filled out as well. The fields, Organizational Unit and State or Province, may remain blank.
Creating a CA Certificate depends on both the CA Key and Certificate Request. To ensure that you do not accidentally overwrite the CA Certificate, an extra box must be checked to (Re)generate CA Certificate.
Generating a Server Key, Certificate, and Certificate Request have similar dependencies on each other. The Server Certificate has an additional dependency on the CA Key and CA Certificate.