• Step 3: Performing the Installation
  • Step 4: Assigning Port Numbers
  • Step 5: Startup After Changing Port Assignments
  • Step 7: Stop HP–UX Apache
  • 7 Migrating Your Apache Configuration from 2.0.x to HP-UX Apache-based Web Server
  • 7.1 Migrating the HP Apache Core
  • 7.1.1 Migrating Process Handling
  • Table 7.1.1.1 HP Apache 2.0.x Process Directives in /opt/hpws/apache/conf/httpd.conf
  • Table 7.1.1.2 HP-UX Apache Web Server Process Directives in /opt/hpws22/apache/conf/httpd.conf/opt/hpws/apache/conf/httpd.conf
  • H P Apache 2.0.x Multiprocess Diagram
  • HP-UX Apache-based Web Server Worker Multiprocess Multithread (MPM) Diagram
  • Verification
  • Loading Modules in HP-UX Apache-based Web Server
  • 7.2.07.1.3 Migrating Logging
  • Logging in HP-UX Apache-based Web Server
  • 7.1.4 Migrating the Printing of Error Messages
  • Printing Error Messages in HP-UX Apache-based Web Server3.x:Server
  • Verify
  • Assigning Ports in HP Apache 2.0.x
  • Assigning Ports in HP-UX Web Server Suite 3.x
  • Binding to a Particular Address in HP Apache 2.0.x and HP-UX Web Server Suite
  • 7.1.6 Migrating Access to Configuration Files
  • 7.2 Migrating Included Modules
  • September 2008 Migration Guide




    Download 1.14 Mb.
    bet4/11
    Sana21.03.2017
    Hajmi1.14 Mb.
    1   2   3   4   5   6   7   8   9   10   11

    Step 1: Preparing the Web Server Environment

    Prepare the web server environment before starting the nstallation process. For more information, see Preparing for Installing HP-UX Web Server Suite.



    Note: Remember to backup your system.

    Step 2: Remove Technology Preview Installation

    If you participated in the Technology Preview Program and still have HP Apache-based Web Server Version 2.0.0 Tech Preview installed on your system, Save any Apache configuration files, ssl certificates, Tomcat configuration files, and webapps that you may have changed or added.

    To check to see if it is installedensure that it is uninstalled. Save any Apache configuration files, ssl certificates, Tomcat configuration files, and webapps that you may have changed or added.

    To verify that it is installed, enter:

    /usr/sbin/swlist | grep B9416AA
    The product is installed if the following is listed:

    B9416AA 2.0.00.00.02 HP Apache-based Web Server with Strong


    (128bit) Encryption

    To stop Apache, Tomcat, and Webmin as root type:,enter

    /opt/hpapache2/bin/apachectl stop /opt/hpapache2/tomcat/bin/shutdown.sh /opt/hpapache2/webmin/webmin-init stop

    To uninstall the Technology Preview, as root, enter

    /usr/sbin/swremove B9416AA

    Also remove the directories completely. As root ,enter

    rm –rf /opt/hpapache2

    Step 3: Performing the Installation

    While HP Apache 2.0.x is running, perform the HP-UX Web Server Suite installation.

    The HP-UX Web Server Suite product bundle is part of HP-UX. There are two products. One is for IPv4 and has the product number B9416AA. The other is for the new long IP addresses defined by IPv6 and the product number is B9416BA. This example uses the IPv4 product. To install the HP-UX Web Server Suite, you can use one of the two methods listed below:


    • Install using the HP SW Depot Web Release:

    www.hp.com/go/webserver-)Click “downloads”.

    • Install using the HP-UX 11.0/11 i Application Release CDs (when available).

    Step 4: Assigning Port Numbers

    Modify the httpd.conf and the httpd-ssl.conf files to assign non-default ports in the HP-UX Web Server Suite.



    Default Port Assignments in HP-UX Web Server Suite:

    To check that the proposed new port assignments are not already being used, enter :

    netstat -a | egrep "8080|8443"

    Select other unused port numbers, if necessary.

    In /opt/hpws22/apache/conf/httpd.conf/opt/hpws/apache/conf/httpd. Conf, the port is configured by: Listen 80

    To eliminate the conflict, change it to:

    Listen 8080

    In /opt/hpws22/apache/conf/extra/httpd-ssl.conf the ports are configured by:

    Listen 443

    ServerName www. yourserver. com: 443 VirtualHost <www.yourserver.com: 443>

    To eliminate conflicts, change them to:

    Listen 8443

    ServerName www. yourserver. com: 8443 VirtualHost <www.yourserver.com: 8443>

    Step 5: Startup After Changing Port Assignments

    Start HP-UX Web Server Suite by entering as root with the following change:

    Uncomment

    #Include conf/extra/httpd-ssl.conf line in httpd.conf

    /opt/hpws22/apache/bin/apachectl start

    Step 6: Perform a Quick Check of the HP-UX Web Server Suite Installation

    In a browser, enter the following URLs.

    To access the index.html page, enter:

    http://yourserver.com:8080

    The HP-UX Apache-based Web Server home page appears.

    To execute the test CGI script, enter:

    http://yourserver.com:8080/cgi-bin/test-cgi

    Several lines of text listing environment variables appear. The first line should be: CGI/1.0 test script report:

    To access the index.html page securely, enter: https://yourserver.com:8443

    The HP-UX Apache home page appears.


    Step 7: Stop HP–UX Apache

    Stop the HP-UX Web Server Suite, if it is running, before continuing with the migration process. As root, enter:

    /opt/hpws22/apache/bin/apachectl stop

    Step 8: Migrating to an HP-UX Web Server Suite Environment

    Configure your HP-UX Web Server Suite to retain any customizations you have made to your HP Apache-based Web Server 2.0.x environment. For more information, see Migrating Your HP Apache Configuration from 2.0.x to HP-UX Web Server Suite.

    Also, see the release documents that are bundled with the product to familiarize yourself with the HP-UX Web Server Suite’s capability. For administrator guides, user guides, and configuration information, see: /opt/hpws22/hp_docs

    7 Migrating Your Apache Configuration from 2.0.x to HP-UX Apache-based Web Server

    During the installation of HP-UX Web Server Suite, the new default httpd.conf file that configures the operation of HP-UX Web Server Suite is placed in /opt/hpws22/apache/conf/httpd.conf. Ensure that this new file incorporates any customizations that you made to the 2.0.x version of the file /opt/hpws/apache/conf/httpd.conf.

    You can accomplish these migration changes by two methods. You can edit your old 2.0.x httpd.conf file to conform to the HP-UX Web Server Suite requirements (usually the most convenient method). If you use this method, ensure that the updated httpd.conf file is placed in /opt/hpws22/apache/conf. As an alternative method, you can transfer your 2.0.x httpd.conf file customizations to the new HP-UX Web Server Suite version of the httpd.conf file. For more information, see Quick Guide to Migration Solutions.

    The following sections list the features that are new, changed, and deleted in HP-UX Web Server Suite, and the changes you may need to make.

    You must follow the suggested order of migration because some things will not work unless previous steps have been performed.

    7.1 Migrating the HP Apache Core

    To migrate the HP Apache Core, see the following sections:



    • Migrating Process Handling

    • Migrating Module Loading

    • Migrating Logging

    • Migrating the Printing of Error Messages

    • Migrating Port Number Assignments

    • Migrating Access to Configuration Files

    7.1.1 Migrating Process Handling

    It is important that you do not adjust the Process Handling directives in the HP-UX Apache-based Web Server because Apache dynamically adjusts the number of processes and threads based on the load. If you have extremely high loads, increase the MinSpareThreads and MaxSpareThreads directives.

    Process directives have changed between HP Apache 2.0.x and HP-UX Web Server Suite Apache3.x.

    HP Apache 2.0.x is process-oriented and the directives in Table 6 reflect it. For more information, see httpd.apache.org/docs/mod/core.html.



    Table 7.1.1.1 HP Apache 2.0.x Process Directives in /opt/hpws/apache/conf/httpd.conf

    Process Directive

    Default Value

    Description

    StartServers

    5

    StartServers specifies the number of servers to initially start.

    MaxClients

    150

    MaxClients specifies the maximum number of child processes running simultaneously. It directly translates to the maximum number of concurrent requests served by the web server.

    Process Directive

    Default Value

    Description

    MinSpareServers

    5

    MinSpareServers sets the desired minimum number of idle child processes at any time. It serves as a trigger point for Apache to automatically spawn new processes when the number of idle processes falls below MinSpareServers.

    MaxSpareServers

    10

    MaxSpareServers sets the desired maximum number of idle child processes at any time. It serves as a trigger point for Apache to automatically kill spare idle processes, when the number of idle processes goes above MaxSpareServers.

    MaxRequestsPerChild

    0

    MaxRequestsPerChild sets the number of requests a child process will handle, before it is killed (aged-out). A value of 0 implies that the child process would never expire.

    The following table lists the default process directives in the HP-UX Apache-based Web Server.

    HP-UX Apache-based Web Server is thread-oriented as reflected in the following table. For more information, see httpd.apache.org/docs-2.x/mod/worker.html.



    Table 7.1.1.2 HP-UX Apache Web Server Process Directives in /opt/hpws22/apache/conf/httpd.conf/opt/hpws/apache/conf/httpd.conf

    Process Directive

    Default Value

    Description

    StartServers Threads PerChild

    2 25

    StartServers specifies the number of server processes to start at start-up time. However, the number of "workers" available to serve requests is dependent on the Threads PerChild directive. Hence, in this example, the number of workers available is 2*25 = 50.

    MaxClients

    30

    MaxClients specifies the maximum number of child processes running simultaneously. In
    conjunction with the ThreadsPerChild directive, it translates to maximum number of concurrent requests served, in this case 30*25=750 requests.

    MinSpareThreads

    25

    MinSpareThreads sets the desired minimum number of idle threads at any time. It serves as a trigger point for Apache to automatically spawn a new process, when the number of idle threads falls below 25 (in this example). Spawning of each new process directly translates into 25 (ThreadsPerChild) new threads.

    MaxSpareThreads

    75

    MaxSpareThreads sets the desired maximum number of idle threads at any time. It serves as a trigger point for Apache to automatically kill spare idle processes, when the number of idle processes goes above 75 (as in this example). Killing of each process directly translates into 25 (ThreadsPerChild) killed threads.

    MaxRequestsPerChild

    0

    MaxRequestsPerChild sets the number of requests a child process will handle, before it is killed (aged-out). A value of 0 implies that the child process would never expire.

    HP Apache 2.0.x Multiprocess Diagram

    Parent Process




    StartServers 5
    Child

    Child




    Child

    Child




    Child

    Process

    Process




    Process

    Process




    Process

    MinSpareServers 5

    MaxSpareServers 10

    Therefore, a quiet server with no connections has a minimum of 5 and maximum of 10 child processes running.

    HP-UX Apache-based Web Server Worker Multiprocess Multithread (MPM) Diagram

    Parent Process 1 Implicit Thread


    StartServers 2


    LoadModule mod _cgid



    CGID process
    1 Implicit Thread




    Child Process
    1 Implicit Thread

    1 Thread to create following threads.






    Child Process
    1 Implicit Thread

    1 Thread to create following threads.


















    1 Master Thread
    25 Worker Threads

    (ThreadsPerChild 25)






    1 Master Thread
    25 Worker Threads

    (ThreadsPerChild 25)



    MinSpareThreads 25

    MaxSpareThreads 75

    Therefore, a quiet server with no connections has a minimum of 3 and a maximum of 4 child processes running.

    Verification:

    To verify, enter:

    ps -f | grep httpd

    With the default settings, 4 httpd processes appear.



    7.1.2 Migrating Module Loading

    In HP Apache 2.0.x, the AddModule directives specified what modules to enable, and the LoadModule directives specified the order in which the modules would be loaded. However, in Apache 2.2,2.0, the order in which module loading occurs is handled automatically. Therefore, the AddModule and ClearModuleList directives have been removed. The LoadModule directive specifies the modukes to load.


    Loading Modules in HP-UX Apache-based Web Server:

    For example, you have added 2..x modules to the HP Apache 2.x httpd. conf file. To move these modules to HP-UX Apache 2.2.x, ensure that you have the 2.x versions of the modules. (If you have user-created modules, see Porting User-Crea



    ted Modules to HP Apache 2.x for more information.) For example, if you added mod _xyz module in 2.0.x and now want to add it to the HP-UX Apache-based Web Server, the entry in the /opt/hpws22/apache/conf/httpd./opt/hpws/apache/conf/httpd. conf file would be:

    LoadModule mod _xyz modules/mod _xyz. so



    7.2.07.1.3 Migrating Logging

    The AgentLog, RefererLog, and RefererIgnore directives have been removed in HP-UX Apache Web Server. Agent and referer logs are still available using the CustomLog and LogFormat directives of mod_log_config. The SetEnvIf directive of mod _setenvif can be used for ignoring referers.


    Logging in HP-UX Apache-based Web Server:

    By default, logging is disabled in HP-UX Apache-based Web Server because it affects performance. You must define a format with the LogFormat directive and then use the CustomLog directive to attach it to a specific log file. 2.0.x functionality can achieved with the following directives:

    LogFormat "%{ User-agent} i" agent CustomLog logs/agent_log agent

    LogFormat "%{ Referer} i -> %U" referer

    SetEnvIf Referer www\.yourserver\.com server-request CustomLog logs/referer _log referer env=! server-request

    7.1.4 Migrating the Printing of Error Messages

    The 2.0.x method continues to work but according to ASF ErrorDocument directive information, you must provide the closing quote. It is unclear if ASF will enforce this in future releases.



    Printing Error Messages in HP Apache 2.0.x:

    Error messages were specified in 2.0.x in /opt/hpws/apache/conf/httpd./opt/apache/conf/httpd. conf.


    The ErrorDocument directive used a quote only at the beginning of the argument to indicate a text message.

    ErrorDocument 403 "Some Message



    Printing Error Messages in HP-UX Apache-based Web Server3.x:Server:

    The ErrorDocument directive no longer uses a quote at the beginning of the argument to indicate a text message. Instead, enclose the message in double quotes.

    Error messages are specified in 2.x in /opt/hpws22/apache/conf/httpd./opt/hpws/apache/conf/httpd. conf:

    ErrorDocument 403 "Some Message"



    Verify

    Currently no error is generated if you follow the earlier procedure.



    7.1.5 Migrating Port Number Assignments

    HP Apache-based Web Server 2.0.x and HP-UX Web Server Suite can run simultaneously on the same machine if they use different port numbers or use different IP addresses. Each web server has its own binary.

    HP-UX Web Server Suite can be installed in any location allowing multiple Apache 2.x installations to run on the same machine provided they use unique port numbers or use different IP addresses.

    Assigning Ports in HP Apache 2.0.x:

    Ports were assigned in 2.0.x in the “/opt/hpws/apache/conf/httpd.“/opt/apache/conf/httpd. conf” file.

    For example, if you wanted HP Apache to accept requests on Port 80, the following directive would be specified: Port 80

    However, if you wanted the same Apache server to listen in on an additional port, say 8000, you would use the following directives together.

    Port 80

    Listen 80



    Listen 8000

    Assigning Ports in HP-UX Web Server Suite 3.x:

    In the 2.x version of Apache, the directives Port and BindAddress have been removed. Equivalent functionality is provided by the Listen directive. The Listen directive informs the server to accept incoming requests only on the specified port or address-and-port combinations. If only a port number is specified in the Listen directive, the server listens to the given port on all interfaces. If an IP address and a port are specified, the server will listen on the given port and interface. Multiple Listen directives may be used to specify a number of addresses and ports to listen to. The server will respond to requests from any of the listed addresses and ports.

    To accept requests on Port 80, the directive would be specified in /opt/hpws22/apache/conf/httpd./opt/hpws/apache/conf/httpd. conf. Listen 80

    However, if you wanted the same Apache server to listen in on an additional port, say 8000, you would use the following directives together.


    Listen 80 Listen 8000

    To make the server accept connections on two specified interfaces and port numbers, use

    Listen 192.170.2.1:80 Listen 192.170.2.5:8000

    Binding to a Particular Address in HP Apache 2.0.x and HP-UX Web Server Suite:

    In Apache 2.0.x,, BindAddress was used to bind the server to the specified address. If the argument was * (an asterisk), the server bound to all interfaces currently marked as up on the server. The Port directive specifies which port to bind to. Only one BindAddress must be used.

    In 2.2,2.0, the Listen directive can be used to achieve the same result.

    Table 7.1.1.3




    HP Apache 2.0.x

    HP Apache 2.0.x Alternate
    Method

    HP-UX Apache-based Web Server 3.x

    BindAddress * Port 80

    Listen *:80

    Listen *:80

    BindAddress

    111.222.333.444 Port 80



    Listen 111.222.333.444:80

    Listen 111.222.333.444:80

    BindAddress

    yourserver.com Port 80

    No equivalent. Can use only IP address.

    No equivalent. Can use only IP address.

    No support for IPv6

    No support for IPv6

    Listen [ fe80::1] :80

    Verify:

    Stop and start Apache.

    The default Apache configuration starts four httpd processes. VerifyTo v all processes are running, enter:

    ps -e | grep httpd



    Note:

    In both HP Apache 2.0.x and HP-UX Apache-based Web Server, Listen does not implement Virtual Hosts. It only tells the main server what addresses and ports to listen to. If no directives are used, the server will behave in the samemanner for all accepted requests. However, can be used to specify a different behavior for one or more of the addresses and ports. To implement a VirtualHost, the server must be configured to listen to the address and port to be used. Then a section must be created for a specified address and port to set the behavior of this virtual host. If the is set for an address and port that the server is not listening to, it cannot be accessed.

    For more information, see the documentation on Listen directive, Virtual Hosts, DNS Issues or section. See also, Setting which addresses and ports Apache uses.

    7.1.6 Migrating Access to Configuration Files

    In Version 2.0.x, HP Apache commented out the ResourceConfig and AccessConfig directives and the files srm.conf and access.conf had only comments. Since Apache 2.0.6 directives from srm.conf and access.conf have been included within httpd.conf. The ResourceConfig and AccessConfig

    directives have been removed in HP-UX Apache-based Web Server. Existing instances of these directives can be replaced with the "Include" directive, which has equivalent functionality.

    If you have been using default values of the ResourceConfig and AccessConfig directives in HP Apache 2.0.x without including them in the configuration files, then in HP-UX Apache-based Web Server you may need to add the Include conf/access.conf and Include conf/srm.conf directives in your /opt/hpws22/apache/conf/httpd.conf file.

    toT assure that Apache reads the configuration files in the same order as implied by the older directives, the Include directives must be placed at the end of httpd.conf, with the one for srm.conf preceding the one for access.conf.

    7.2 Migrating Included Modules

    See Module Changes in the Appendix.


    1   2   3   4   5   6   7   8   9   10   11


    Download 1.14 Mb.

    Bosh sahifa
    Aloqalar

        Bosh sahifa


    September 2008 Migration Guide

    Download 1.14 Mb.