Apache reverse proxy on Linux firewall

Source: Internet
Author: User
Tags reserved web services domain domain name access root directory firewall linux

"Guide" This article focuses on installing a Web server--apache with proxy and override rule features on the corporate firewall, as well as concrete steps for compiling and setting up Apache. After a successful installation, flexible virtual host settings allow external users to access multiple Web servers on the internal LAN via a firewall.

test environment and network structure

The test environment used in this article is Redhat Linux 7.2, Apache 1.3.24, the company domain name assumption is company.com.

The typical network structure of the company is shown in the attached figure.

Note: 2 network cards are installed on the firewall in the drawings, where the external public address of the E0 port is the 1.2.3.4,E1 port corresponding to the internal reserved address of 192.168.2.1. There are 3 Web servers within the LAN, A, B, and C, and their corresponding domain names are weba.company.com, webb.company.com, and webc.company.com, each with an internal reserved address.

Second, the Operation steps

As shown in the attached picture, the company is connected to the Internet via a dedicated line, has a firewall installed, there are 3 Web servers inside the LAN, only internal reserved address, but hope they can provide external Web services.

1. Setting up DNS

The DNS,IP address for setting up the internal 3 Web servers on the firewall (which is also the company's DNS server) is 1.2.3.4. In this way, when parsing weba.company.com, webb.company.com, and webc.company.com on the Internet, it points to the external interface address 1.2.3.4 of the same IP address, the firewall.

2. Download Apache

Download the current version of the Apache 1.3.24 to the/root directory from the Apache website (http://www.apache.org) and download the address for http://www.apache.org/dist/httpd/apache_1.3.24.tar.gz.

3. Change the source code so that the maximum allowable number of requests connected to more than 256

Because Apache defaults to allow a maximum number of connections of 256, the number of connections on a busy Web site may not be enough, especially if this article describes the use of the Apache reverse proxy on the firewall to allow external users access to multiple internal Web servers, you can change src/ Include/httpd.h the method of the file, the concrete steps are as follows.



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.