Sunday, April 13, 2008

Apache: Proxy and ReverseProxy Server

Redirect your all traffic:
Case:
example.com A record is point to server with IP10.1.31.7 (mean its resolves to IP 10.1.31.7 ), but you are running your web server from example.com on server with IP 10.1.31.8.
So, you want all traffic coming to 10.1.31.7 will redirect to 10.1.31.8.

Do the following changes on server have IP 10.1.31.7 :
1. Run apache.
2. Do the following entry in apache.
a. NameVirtualHost 10.1.31.7
b <VirtualHost 10.1.31.7:80 >
ServerName example.com
ServerAlias www.example.com
DocumentRoot /home/test
ProxyRequests off
ProxyPass / http://www.example.com/
ProxyPassReverse / http://www.example.com/
<Location />
ProxyPassReverse /
</Location>
</VirtualHost>
3. Do the following entry in /etc/hosts.
10.1.31.8 example.com
10.1.31.8 www.example.com
(make sure once you #ping example.com from 10.1.31.7 it resolver's to 10.1.31.8).

Note: its redirect only http request not https.

more you can see on this link

No comments:

SHOW ENGINE INNODB STATUS

  The SHOW ENGINE INNODB STATUS command in MySQL provides detailed information about the internal state of the InnoDB storage engine. This ...