If the content are in the same server, it would be easy to archieve this by using VirtualHost. So how about in this case? We can use the module "Rewrite".
Support the default webserver is server1 (all traffic from Internet will go to this server first). We add a virtual host and use rewrite to "redirect" request of server2:
...
<VirtualHost *:80>
ServerName
ServerAdmin admin@
ErrorLog logs/<hostname/IP>-error_log
CustomLog logs/<hostname/IP>-access_log combined
RewriteEngine on
RewriteRule ^/(.*) http://<hostname/IP>/$1 [L,P]
</VirtualHost>
...
Note:
hostname of server2 should be resolved by server1
you cannot have multitple SSL(443) connection with 1 IP
Reference: http://httpd.apache.org/docs/2.2/misc/rewriteguide.html
No comments:
Post a Comment