Understanding the PID File

4-4 Oracle Fusion Middleware Administrators Guide for Oracle HTTP Server

4.1.2.3 Starting Oracle HTTP Server on a Privileged Port

On a UNIX system the TCPIP port numbers below 1024 are special in that only processes with root privileges are allowed to listen on those ports. By default, Oracle HTTP Server runs as a non-root user the user that installed Oracle Fusion Middleware. Therefore, on UNIX systems, if you plan on running Oracle HTTP Server on a privileged port for example, port 80, you must enable Oracle HTTP Server to run as root, as follows:

1. Stop Oracle HTTP Server using Fusion Middleware Control, or with the following

opmnctl command: opmnctl stopproc ias-component=ohs_name 2. Change to the root user. 3. Navigate to ORACLE_HOMEohsbin and run the following commands: chown root .apachectl chmod 6750 .apachectl 4. Exit as the root user. 5. Add or uncomment the User and Group directives in the httpd.conf file and set them to the user and group that were used to install and configure Oracle Fusion Middleware. 6. Start Oracle HTTP Server using Fusion Middleware Control, or with the following command: opmnctl startproc ias-component=ohs_name

4.1.3 Stopping Oracle HTTP Server

This section describes how to stop Oracle HTTP Server using Fusion Middleware Control and opmnctl. Other services may be impacted when Oracle HTTP Server is stopped.

4.1.3.1 Using Fusion Middleware Control to Stop Oracle HTTP Server

To stop Oracle HTTP Server using Fusion Middleware Control: 1. Navigate to the Oracle HTTP Server home page.

2. Select Control from the Oracle HTTP Server menu.

3. Select Shut Down from the Control menu.

4.1.3.2 Using opmnctl to Stop Oracle HTTP Server

To stop all Oracle HTTP Server components in an Oracle instance using opmnctl: opmnctl stopproc process-type=OHS To stop a specific Oracle HTTP Server component, such as ohs_name, using opmnctl: opmnctl stopproc ias-component=ohs_name To get detailed information about the stop process, include the verbose option with the command, as follows: opmnctl verbose stopproc ias-component=ohs_name Getting Started with Oracle HTTP Server 4-5

4.1.4 Restarting Oracle HTTP Server

Restarting Oracle HTTP Server causes the Apache parent process to advise its child processes to exit after their current request or to exit immediately if they are not serving any requests. Upon restarting, the parent process re-reads its configuration files and reopens its log files. As each child process exits, the parent replaces it with a child process from the new generation of the configuration file, which begins serving new requests immediately. The following sections describe how to restart Oracle HTTP Server using Fusion Middleware Control and opmnctl.

4.1.4.1 Using Fusion Middleware Control to Restart Oracle HTTP Server

To restart Oracle HTTP Server using Fusion Middleware Control: 1. Navigate to the Oracle HTTP Server home page.

2. Select the Control from the Oracle HTTP Server menu.

3. Select Restart from the Control menu.

4.1.4.2 Using opmnctl to Restart Oracle HTTP Server

To restart all Oracle HTTP Server components in an Oracle instance using opmnctl: opmnctl restartproc process-type=OHS To restart a specific Oracle HTTP Server component, such as ohs_name, using opmnctl: opmnctl restartproc ias-component=ohs_name To get detailed information about the start process, include the verbose option with the command, as follows: opmnctl verbose restartproc ias-component=ohs_name

4.2 Creating a New Oracle HTTP Server Component

Oracle HTTP Server is not automatically created during installation unless it was selected as a component to be installed. This section describes how to create an Oracle HTTP Server component using opmnctl. You cannot create an Oracle HTTP Server component using Fusion Middleware Control. To create a new Oracle HTTP Server component using opmnctl, use the following command: Note: If your configuration file contains errors, when you issue a restart command, the Apache parent process will not restart; it will exit with an error but it will also leave child processes running when it exits. These are the children that are gracefully exiting by handling their last request. This will cause problems if you attempt to restart Oracle HTTP Server because it will not be able to bind to its listening ports. Therefore, before restarting a server, make sure there are no syntax or semantics errors in the configuration files.