How to change the OHS port to 80

Source: Internet
Author: User
Tags reset port number

Generally, when implementing projects, customers want domain names and addresses to be simple and clear. But OHS is not allowed to use the port number less than 1024 for security reasons, less than 1024 port number is root, and common OHS have their own installation user (Oracle). So if you want to use a port less than 1024, you need to modify the. Apachectl control.

Steps:

1. Close OHS

2. Reset the Listening port

3. Change. Permissions for Apachectl

4. Restart OHS

Close OHS

The code is as follows

# 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, where we set it to 80

The code is as follows

# Assuming your 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 (normally 777x)

# and replace the port number to port 80

Listen 80

# Save the changes

Modify Permissions

The code is as follows

# assuming your are connected to the server as root user

# Use the Mw_home from step 1

CD $MW _home/oracle_wt1/ohs/bin

# Being aware, we have to modify the hidden file. Apachectl (the dot is correct)

Ls-la. Apachectl

-rwxr-x---1 oracle oinstall 13278 Dec 03:54. Apachectl

Chown Root. apachectl

chmod 6750. Apachectl

Ls-la. Apachectl

-rwsr-s---1 root oinstall 13278 Dec 03:54. Apachectl

Note: On Linux with "." The file at the beginning is hidden by default.

Finally reboot 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-If your Oracle HTTP Server is-up and

# The OPTION-L display the used ports (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.