Wdlinux in Apache configuration reverse proxy module

Source: Internet
Author: User

It is not possible to turn on the reverse proxy function in. htaccess [Apache does not have mod_proxy module].htaccess file contents as follows
Rewriteengine onrewritebase/rewriterule ^ (. *) $ http://sogou.weixin.com/$1 [P]

"Proxy| P "(Mandatory for proxy)

This token causes the replacement component to be internally forced to send as a proxy request, and immediately interrupts the rewrite process and then transfers the processing to the Mod_proxy module. You must make sure that this replacement string is a valid URI that can be processed by mod_proxy (for example, starting with http://hostname), or you will get an error returned by a proxy module. With this tag, some remote components can be mapped to the local server domain name space, thereby enhancing the functionality of the Proxypass directive.
Note: To use this feature, the Mod_proxy module must already be enabled.

The Apache part of the Wdlinux configuration file is this,

# Example:

# LoadModule Foo_module modules/mod_foo.so

LoadModule Rpaf_module modules/mod_rpaf-2.0.so

LoadModule Php5_module modules/libphp5.so

#

A. First know my own Apache version for httpd-2.2.22

Download the source code to/root/httpd-2.2.22.tar.gz, in apache.org provided the site did not find this version, I uploaded on the csdn, there is a need to use

################ Download Resources ##################

httpd-2.2.22.tar.gz Source Package-Download channel-csdn.net http://download.csdn.net/detail/l496501043/9435762

################ Download Resources ##################
cd/root/
Tar zxvf httpd-2.2.22.tar.gz
CD  httpd-2.2.22/modules/proxy/

#编译安装

/www/wdlinux/httpd-2.2.22/bin/apxs-i-c-a mod_proxy.c proxy_util.c  /www/wdlinux/httpd-2.2.22/bin/apxs-i-c-a Mod_proxy_http.c/www/wdlinux/httpd-2.2.22/bin/apxs-i-c-a Mod_proxy_ftp.c/www/wdlinux/httpd-2.2.22/bin/apxs-i-C- A mod_proxy_connect.c

If normal, it will be in

Generated under the/www/wdlinux/httpd-2.2.22/modules/directory

Mod_proxy.so, mod_proxy_connect.so, mod_proxy_ftp.so, mod_proxy_http.so several files.

Apache configuration/www/wdlinux/httpd-2.2.22/conf/httpd.conf has added the following four lines of configuration statements, compared to the above mentioned configuration file

# Example:

# LoadModule Foo_module modules/mod_foo.so

LoadModule Rpaf_module modules/mod_rpaf-2.0.so

LoadModule Php5_module modules/libphp5.so

LoadModule Proxy_module modules/mod_proxy.so

LoadModule Proxy_http_module modules/mod_proxy_http.so

LoadModule Proxy_ftp_module modules/mod_proxy_ftp.so

LoadModule Proxy_connect_module modules/mod_proxy_connect.so

#

Restart Apache, see. htaccess the rules for the reverse proxy are in effect. [Already in force]

Wdlinux in Apache configuration reverse proxy module

Related Article

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.