My Oracle Support Banner

Error in ohs log: File Does Not Exist: /Oracle_WT1/instances/PROD/$(APACHE2_HOME) (Doc ID 1484618.1)

Last updated on MAY 30, 2023

Applies to:

Oracle Fusion Middleware - Version to [Release Oracle11g to 12c]
Information in this document applies to any platform.


The following error gets logged into the ohs diagnostic/logs OHS file every 20 seconds after the ohs server is started:


Most commonly this issue would happen when the DocumentRoot is commented out completely or moved into a VH definition in the httpd.conf file. Following is an explanation of what conditions to look for that will cause the issue when DocumentRoot is moved ot a VH structure.

The initial discovery of this problem was when the document root was moved to a VH with port 80 defined. However a different port was used for the global Listen directive. Port 80 was never opened with a Listen directive and since the DocumentRoot was defined only for port 80, the result is this APACHE2_HOME error in the ohs log. Thus as the solution defines, the Listen directive defined globally must be changed to open this same VH defined port.

Further testing uncovered the following anomaly resulting in this same error. With the condition just described concerning the VH, if the VH port were to be defined with a second Listen directive globally, the described error will occur is the second Listen directive is defined after another Listen directive.

In other words, the first Port defined in the httpd.conf will be used to identify the Document root. An example will best demonstrate this. Following is a snippet from httpd.conf showing Listen, DocumentRoot, and VH conditions leading to described issue.


# Hence default global DocumentRoot commented out

#DocumentRoot "${ORACLE_INSTANCE}/config/${COMPONENT_TYPE}/${COMPONENT_NAME}/htdocs"


Listen 7777


NameVirtualHost *:80
Listen 80
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
<VirtualHost *:80>
    DocumentRoot "${ORACLE_INSTANCE}/config/${COMPONENT_TYPE}/${COMPONENT_NAME}/htdocs"
    ServerName host.domain

<end of example>

In the code above note that DocumentRoot is defined within the VH, which uses port 80. So DocumentRoot is only known for port 80.

Hence the Listen is defined and port 80 is opened by ohs. But this case would result in the above error. The reason is when opmn process connects to ohs it will use port 7777 to find the value set for DocumentRoot and it is not known since DomumentRoot is commented out globally and port 7777 does not have any settings from the VH definition.

In this case there are 3 options:

1) Move Listen 80 above Listen 7777

2) Comment Listen 7777 out

3) Uncomment DocumentRoot in global area


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.