How to change the OHS port to 80

  
                  

Generally, when implementing a project, customers want the domain name and address to be straightforward. However, for security reasons, OHS does not allow port numbers less than 1024. Port numbers less than 1024 belong to root. Common OHSs have their own installed users (Oracle). So if you want to use a port smaller than 1024, you need to modify the control of .apachectl.

Steps:

1. Close OHS 2. Reset the listening port 3. Change the permissions of apachectl 4. Restart OHS

Close OHS

Code The following

# assuming your MW_HOME is /u00/app/oracle/product/fmw-11.1.1 export MW_HOME=/u00/app/oracle/product/fmw-11.1.1 cd $MW_HOME/Oracle_WT1/instances /instance1/bin ./opmnctl stopall


Reset the listening port, here we set it to 80

The code is as follows

# assuming you are still Connected as oracle user to your sevrer cd $MW_HOME/Oracle_WT1/instances/instance1/config/OHS/ohs1 cp httpd.conf httpd.conf.save vi httpd.conf # Now go to the line with Listen <portnumber&gt (normally 777x) # and replace the port number to port 80 Listen 80 # save the changes


Modify permissions

Code as follows

# assuming You are connected to the server as root user # use the MW_HOME from step 1 cd $MW_HOME/Oracle_WT1/ohs/bin # be aware, we have to modify the hidden file .apachectl (the dot is correct) ls -la .apach Ectl -rwxr-x--- 1 oracle oinstall 13278 Dec 17 03:54 .apachectl chown root .apachectl chmod 6750 .apachectl ls -la .apachectl -rwsr-s--- 1 root oinstall 13278 Dec 17 03:54 .apachectl


Note: Files beginning with Linux with ”.” are hidden by default.

Finally restart OHS

The code is as follows

cd $MW_HOME/Oracle_WT1/instances/instance1/bin ./opmnctl startall # Then check the status with the option -l # to See if your Oracle HTTP Server is up and # the option -l display the used ports (see picture below) ./opmnctl status –l

Copyright © Windows knowledge All Rights Reserved