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 https://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

 

About the Author Masroof Ahmad

Leave a Comment:

2 comments
Add Your Reply