Apache Configure reverse proxy Server

Source: Internet
Author: User

The previous few days experimented with the next Nginx configuration reverse proxy server. Although the installation of Nginx is troublesome, but it is very simple to use. But no one in the group has ever used Nginx,apache servers. I decided to use Apache in order to reduce the workload of OPS team.

I remember having an Apache server when I was in college and didn't have any difficulties. And this installation is always installed is not successful, the company's rights management of the machine is very strict, I do not have root authority, no connection outside the network permissions, compile Apache when there are a lot of dependencies can not be, and finally asked Ops team to help the people to fix.

Configure the proxy module. The proxy module of the Apache server is optional and is not added to the reverse proxy module at compile time, but can still be dynamically loaded by modifying the configuration after the compilation is complete. Configuration in conf/httpd.conf, the reverse proxy-related module uncomment is good. It is important to note that Apache does not automatically resolve dependencies if there is a dependency between modules, but instead tells us which module is missing in Error.log.

As for the reverse proxy configuration, also in the httpd.conf, the configuration is very similar to nginx, for my needs, as long as the httpd.conf to add

Listen 8080<virtualhost *:8080>    LogLevel error        <location/>        proxypass http://hostname1:2014 /        proxypass http://hostname2:2014/        #ProxyPassReverse http://mywebsite.jamescoyle.net/    </location >    </VirtualHost>

  

It is important to note that a conversion that requires the addition of a/otherwise URL after Port 2014 will cause an error.

After shutting down the service on the hostname1, Apache will route the request to Hostname2, which is consistent with my requirements.

After the reverse proxy has been set up, I still do not understand some of the configuration, such as Proxypassreverse,servername and so on.

Apache Configure reverse proxy Server

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.