This article will introduce you in detail how to change the OHS port to port 80. For more information, see.
Generally, when implementing a project, the customer wants the domain name and address to be simple and clear. However, to ensure security, the OHS does not allow the port number to be smaller than 1024. The port number smaller than 1024 is root. Common OHS users have their own installation users (Oracle ). Therefore, if you want to use a port smaller than 1024, You need to modify the control of. apachectl.
Steps:
1. Disable OHS
2. Reset the listening port
3. Change the permission of. apachectl.
4. Restart OHS
Disable OHS
The Code is as follows: |
Copy code |
# 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 |
Set the listening port to 80.
The Code is as follows: |
Copy code |
# 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 & lt; portnumber & gt; (normally 777x) # And replace the port number to port 80 Listen 80 # Save the changes |
Modify permissions
The Code is as follows: |
Copy code |
# 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. apachectl -Rwxr-x --- 1 oracle oinstall 13278 Dec 17. apachectl Chown root. apachectl Chmod 6750. apachectl Ls-la. apachectl -Rwsr-s --- 1 root oinstall 13278 Dec 17. apachectl |
Note: Files starting with "." in Linux are hidden by default.
Finally, restart OHS.
The Code is as follows: |
Copy code |
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 |