How to change the OHS port to 80

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.