Apache maps multiple ports with multiple domain names and apache maps multiple ports.

Source: Internet
Author: User

Apache maps multiple ports with multiple domain names and apache maps multiple ports.

1. httpd. conf file configuration

# Ensure that the following modules are loaded

LoadModule proxy_module modules/mod_proxy.so

LoadModule proxy_http_module modules/mod_proxy_http.so


# Introduce httpd-vhosts.conf
Include conf/extra/httpd-vhosts.conf


Ii. httpd-vhosts.conf file configuration

<VirtualHost *: 80>
ServerName www.xxx.org
# Reverse proxy settings
ProxyPass/http: // 192.168.2.2: 8095/
ProxyPassReverse/http: // 192.168.2.2: 8095/
</VirtualHost>


<VirtualHost *: 80>
ServerName www.abc.org
# Reverse proxy settings
ProxyPass/http: // 192.168.2.2: 8081/
ProxyPassReverse/http: // 192.168.2.2: 8081/
</VirtualHost>


Restart Apache after Configuration

Note: ProxyPass/here '/' indicates a root directory like this: www.xxx.org


Internet access:

1. Add the port number

Because the port number 80 of the personal computer is an electronic envelope, the port number must be added when accessing the peanut shell domain name.

For example, change www.xxx.org to www.xxx.org: 8095.

2. Do not add a port (the port number is not added when the URL is entered, but the port number is still available after the jump)

1. Disable www.xxx.org in DDNS of peanut shells

2. DNS resolution subdomain name: www, record type: Implicit URL, URL: [peanut shell name + port number] such as xxx.oicp.net: 8095

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.