Configure Oracle HTTP Server (OHS) on port 80 / 443

Oracle HTTP Server (OHS) is a Web Server from Oracle built on top of Apache with additional modules like mod_osso, mod_ossl etc . OHS by default listen on port 7777 or 8888 (non SSL/HTTP) and 4443 (SSL/HTTPS).  This post covers steps to re-configure OHS to listen on port 80 (HTTP)/443 (HTTPS)

 

Key things good to know

  • Port on which HTTP Server listen is defined in $ORCALE_INSTANCE/config/OHS/ohs1/httpd.conf (parameter Listen)
    Note: Location of httpd.conf may be different depending on OHS version (above location is for OHS 11g)
  • If there is load balancer listening on port 80 , forwarding request to OHS listening on port 7777 then in httpd.conf value of parameter Listen should set to 7777 and value of parameter Port should be 80
  • Default HTTP port is 80 and HTTPS by default is 443 i.e. if you use http://onlineappsdba.com (http but no port at the end) then you are making request on port 80 or if you us https://onlineappsdba.com (https but no port at the end) then you are making request on port 443)
  • OHS on Linux/Unix is installed and run as non Root user
  • On Unix any service (including OHS) that runs on port < 1024 must be run as root user. You must re-configure OHS so that service is started as root user

 

Steps to configure OHS to listen on port 80/443

  • If OHS is running then stop OHS as opmnctl stopall (from user that installed OHS)
  • Change owner of $ORACLE_HOME/ohs/bin/.apachectl to root and change permission of this file to 6750(as user root)chown root .apachectl 
    chmod 6750 .apachectl

    Note: .apachectl is hidden file (dot in front signifies hidden file)
  • Change Listen in httpd.conf to 80 and Listen in ssl.conf to 443
  • Start OHS as opmnctl startall (from user that installed OHS)

Related/References

Did you get a chance to download Free Interview Questions related to Oracle Fusion Middleware ? If not, download it here http://k21academy.com/fmw-interview-question

 

fmw banner

 

Share This Post with Your Friends over Social Media!

About the Author Atul Kumar

Oracle ACE, Author, Speaker and Founder of K21 Technologies & K21 Academy : Oracle Gold Partner specialising in Design, Implement, and Trainings.

follow me on:

Leave a Comment:

2 comments
Afzal says April 1, 2014

Hi Atul,

In my setup OHS is installed by Oracle user with group DBA.

I had made the below changes in httpd.conf under ORACLE_HOME/ohs/instances/instance1/config/OHS/ohs1

Listen to 80

apachectl seems like a regular file with user Oracle and group Db .

When i logged in as root and changed the owner to root as specified by u then OHS fails to start saying apachectl is owned by root when i login in oracle and and try to start it.

There is another file called called port.prop under ORACLE_HOME/instances/instance1/config/OPMN/opmn and there listen port is mentioned as 7777 like below.

/ohs1/SSLPort=4443
/opmn/remote_port=6701
/ohs1/ProxyPort=9999
/ohs1/ListenPort=7777
/opmn/local_port=6700

Now i can see the default login page and even port 80 is listening on it. Isnt this strange behaviour?

Is opmn process a different process which also servers http request?

Can you please suggest.

Reply
pramod says May 27, 2014

Hi Atul,

When i was trying to start the OHS server i got the status as

bash-3.2$ ./opmnctl status

Processes in Instance: dwpa13_ohs1
———————————+——————–+———+———
ias-component | process-type | pid | status
———————————+——————–+———+———
ohs1 | OHS | 19187 | Stop

I tried to stop and start and it still gave the same issue.

Also tried to force start this but still the same issue.

How to trouble shoot this ?

Also faced issue when starting the BI services

bash-3.2$ ./opmnctl status
Processes in Instance: dwpa13_vmsodwpay002
———————————+——————–+———+———
ias-component | process-type | pid | status
———————————+——————–+———+———
coreapplication_obiccs1 | OracleBIClusterCo~ | 28271 | Alive
coreapplication_obisch1 | OracleBIScheduler~ | 1714 | Stop
coreapplication_obijh1 | OracleBIJavaHostC~ | 28269 | Alive
coreapplication_obips1 | OracleBIPresentat~ | N/A | Down
coreapplication_obis1 | OracleBIServerCom~ | 28270 | Alive

bouncing BI services again didn’t fix the issue.

Please let me know the steps in fixing both such scenarios!

Reply
Add Your Reply

[i]
[i]