Apache opens proxy agent for domain name Port forwarding

Source: Internet
Author: User

Today to help customers migrate the site, the client is an ASPX is a PHP site, this time there are 2 domain names, but the PHP site is Apache under the pseudo-static, must be used to Apache, but the ASPX site is also necessary to Iis+mssql

Then at this time, Iis+apache are using the 80 port, will certainly conflict, what should be done? Then we can only in the Apache configuration file configuration proxy agent Function!

So simply say Apache under proxy agent,

First open the Apache proxy agent module

httpd.conf file:

LoadModule proxy_module modules/mod_proxy.soloadmodule proxy_connect_module modules/mod_proxy_connect.soloadmodule Proxy_ftp_module Modules/mod_proxy_ftp.soloadmodule Proxy_http_module modules/mod_proxy_http.so

Modify httpd.conf introduce Vhost file

Include conf/extra/httpd-vhosts.conf

The vhosts file is configured as follows:

<virtualhost *:80>servername www.benet.comProxyPass/http://www.benet.com:82/ProxyPassReverse/http:// Www.benet.com:82/</VirtualHost><VirtualHost *:80>servername benet.comproxypass/http://www.benet.com : 82/proxypassreverse/http://www.benet.com:82/rewriteengine onrewritecond%{http_host} ^benet.com [NC]RewriteRule ^ ( . *) $ http://www.benet.com$1 [r=301,l]</virtualhost>

 

Apache opens proxy agent for domain name Port forwarding

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.