Prior to doing this , your Webgate and OHS should be Installed.
This is a 2 step procedure :

1) To deploy the webgate with OHS
2) To Edit OHS to support Webgate


In my case

GCC Location = /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3


export OHS_ORACLE_HOME=/u03/oimfeb21/Oracle/Middleware/Oracle_WT1
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OHS_ORACLE_HOME/lib
export WEBGATE_ORACLE_HOME=/u03/oimfeb21/Oracle/Middleware/Oracle_OAMWebGate1

This is the location where webgate has been installed :

Webgate post installation
cd /u03/oimfeb21/Oracle/Middleware/Oracle_OAMWebGate1/webgate/ohs/tools/deployWebGate



[oimfeb21@dbaloungeapps deployWebGate]$ ./deployWebGateInstance.sh -w /u03/oimfeb21/Oracle/Middleware/Oracle_WT1/instances/instance1/config/OHS/ohs1 -oh /u03/oimfeb21/Oracle/Middleware/Oracle_OAMWebGate1

Copying files from WebGate Oracle Home to WebGate Instancedir


Run the following command to copy the apache_webgate.template from the Webgate_Home directory to the Webgate Instance location (renamed to webgate.conf) and update the httpd.conf file to add one line to include the name of webgate.conf:



export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<Oracle_Home_for_ Oracle_HTTP_Server>/lib

[oimfeb21@dbaloungeapps InstallTools]$ ./EditHttpConf -w /u03/oimfeb21/Oracle/Middleware/Oracle_WT1/instances/instance1/config/OHS/ohs1 -oh /u03/oimfeb21/Oracle/Middleware/Oracle_OAMWebGate1 -o ./upd_http.log

The web server configuration file was successfully updated