Configure request forwarding in Apache-2.2.29 for CentOS-6.4-minimal

Source: Internet
Author: User
/* In the CentOS-6.4-minimal version of Apache-2.2.29 configuration request forwarding * Forward * request forwarding, request redirection, port forwarding, port ing, domain name forwarding, domain name reverse proxy, request proxy and so on can all be implemented through the configuration method described in this article * However, [forward requests to the Tomcat server through the method described in this article], and, [Apache Tomcat integration] is two concepts * the former processes all resources by Tomcat, and the latter processes only dynamic resources by Tomcat (such as JS, CSS, HTML and other static resources are processed by Apache) * for the integration of Apache and tomcat, see the http://blog.csdn.net/jadye R/article/details/39613523 * this article is based on the source code to install Apache-2.2.29, the installation process is detailed in the http://blog.csdn.net/jadyer/article/details/39583879 * installation * when installing Apache, may not compile and load a lot of modules, fortunately, by default, Apache compiles the mod_so.c module, which enables dynamic loading of modules. * The loading method is to put the so file of the module into the Apache/modules/directory, modify Apache/CONF/httpd. load the corresponding module in the conf file and restart Apache *------------ * Add request forwarding module * 1) [[email protected] ~] # Cd/APP/software/httpd-2.2.29/modules/Proxy/* [[email protected] proxy] #/APP/Apache/bin/apxs-c-I-a mod_proxy.c proxy_util.c *[ [email protected] proxy] #/APP/Apache/bin/apxs-c-I-a mod_proxy_http.c proxy_util.c * 2) modify/APP/Apache/CONF/httpd. CONF file * uncomment include CONF/extra/httpd-vhosts.conf * 3) modify the/APP/Apache/CONF/extra/httpd-vhosts.conf file * use the # sign to comment out the original two <virtualhost/> nodes and add the following content (if you need multiple redirects, multiple virtualhosts can be added.) * <virtualhost *: 80> * servername login * errorlog logs/www.jadyer.com _ error_log * customlog logs/login _ access_log common * proxypreservehost on * proxyrequests off * proxypass/http: // 192.168.0.104: 8080/* proxypassreverse/http: // 192.168.0.104: 8080/* </virtualhost> * 4) Restart Apache. * restart * Explanation * 1) /APP/Apache/is the installation directory of Apache,/APP/software/httpd-2.2.29/is the source directory of Apache * 2) -C: Execute the compilation operation *-I: Execute the installation operation (it can automatically put the generated so file into the/APP/Apache/modules/directory) *-A in/APP/Apache/CONF/httpd. in the conf file, a loadmodule is automatically added to activate this module. If this loadmodule already exists, uncomment it and start this module directly. * 3) in fact, the mod_proxy.so and mod_proxy_http.so files are generated in the/APP/Apache/modules/directory, and then the/APP/Apache/CONF/httpd files are ensured. the conf file contains the following two lines of loadmodule to enable this module * loadmodule proxy_module modules/mod_proxy.so * loadmodule proxy_http_module modules/mod_proxy_http.so * And then enable the VM configuration and add the ing information, * Just * @ create Sep 28,201 4 10:00:23 am * @ author Xuan Yu 

Configure request forwarding in Apache-2.2.29 for CentOS-6.4-minimal

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.