<html><head>
<style type="text/css">P {margin-top:2px;margin-bottom:2px;}</style>
</head>
<body style="margin:0;padding:0;">
<table border="0" cellpadding="0" cellspacing="0" style="font-size:10pt;font-family:Dotum;color:#333333;width:100%;;">
<tr><td valign=top style="word-wrap:break-word;"><br />
<style type="text/css">P {margin-top:2px;margin-bottom:2px;}</style>
<table style="font-size: 10pt; font-family: Dotum; color: rgb(51, 51, 51); width: 100%;" border="0" cellpadding="0" cellspacing="0">
<tbody><tr><td style="word-wrap: break-word;" valign="top"><p>Dear all,</p>
<p> </p>
<p>I am testing the Vanish for the reverse proxy for multilple domains.</p>
<p> </p>
<p>Like as below diagram, When user access to 10.10.10.10 (request http host name with <a href="http://www.aaa.com">www.aaa.com</a> ,the Vanish foreard the request to <a href="http://www.aaa.com">www.aaa.com</a> backend server.</p>
<p> </p>
<p>user 1 Domain <a href="http://www.aaa.com">www.aaa.com</a></p>
<p> </p>
<p>user 2 Vanish (10.10.10.x) Domain <a href="http://www.bbb.com">www.bbb.com</a></p>
<p> </p>
<p>user 3 Domain <a href="http://www.ccc.com">www.ccc.com</a></p>
<p> </p>
<p>I looked up the main page but can't find a right sample for this configuration.</p>
<p> </p>
<p>This is a configuration that I add in the default vcl file.</p>
<p> </p>
<p>When I start the vanishd with below configuration , I got an error.</p>
<p> </p>
<p>Please let me know what I made a mistake.</p>
<p> </p>
<p>Regards,</p>
<p> </p>
<p>Yves</p>
<p> </p>
<p>---------------- error messages ---------------------</p>
<p>Expected one of<br />
'acl', 'sub', 'backend', or 'director'<br />
Found: 'if' at<br />
(input Line 16 Pos 1)<br />
if (req.http.host ~ "^(<a href="http://www.%29?aaa.com$">www.)?aaa.com$</a>") {<br />
##-----------------------------------------<br />
Running VCC-compiler failed, exit 1<br />
VCL compilation failed</p>
<p>--------------------------------------------------------</p>
<p> </p>
<p>------------ VCL Configuration ----------------------</p>
<p>backend aaa {<br />
.host = "1.1.1.1";<br />
.port = "80";<br />
}<br />
backend bbb {<br />
.host = "2.2.2.2.";<br />
.port = "80";<br />
}</p>
<p>if (req.http.host ~ "^(<a href="http://www.%29?aaa.com$">www.)?aaa.com$</a>") {<br />
set req.http.host = "<a href="http://www.aaa.com">www.aaa.com</a>";<br />
set req.backend = aaar;</p>
<p>} else if (req.http.host ~ "^(<a href="http://www.%29?bbb.com$">www.)?bbb.com$</a>" {<br />
set req.http.host = "<a href="http://www.bbb.">www.bbb.</a>cpm";<br />
set req.backend = bbb;}<br />
else {<br />
req.backend = default.;<br />
}<br />
}</p>
<p> </p>
<p> </p></td></tr>
</tbody></table>
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="45"><tbody><tr><td align="left" valign="bottom"><a href="http://mail.paran.com/event/mail/?tab=5&p_eye=mail%5Esms%5Esms%5Emai%5Ebanner_0501" target="_blank"><img src="http://mailimg.kthimg.com/paran/footer/mail_banner_100201.gif" style="border: 0pt none;"></a></td></tr></tbody></table>
</td></tr>
</table>
<table border='0' cellpadding='0' cellspacing='0' width='100%' height="45"><tr><td valign="bottom" align="left"><a href="http://mail.paran.com/event/mail/?tab=5&p_eye=mail^sms^sms^mai^banner_0501" target="_blank"><img src="http://mailimg.kthimg.com/paran/footer/mail_banner_100201.gif" style="border:0"></a></td></tr></table>
</body></html>
<img src='http://mail71.paran.com/read/put_ack.php?hp=L0Q3MS95L3YvMS95dmVzMUBwYXJhbi5jb20vLkNvbmZpcm0vMTI3OTUwMjcyOC4xNjc5My5tYWlsNzF4MQ==&from=yves1@paran.com&to=varnish-misc@varnish-cache.org________________________________________________________________________________________________________________________' border='0'>