Your evaluations aren't in any defined functions. Try placing them on vcl_recv. Also you should escape your periods in your regexes.
Paul Procacci
pprocacci at datapipe.com
Mon Jul 19 03:45:36 CEST 2010
Sorry sent from my droid and totally 's foobar'd the response.
Paul Procacci <pprocacci at datapipe.com> wrote:
What's the error?
Yves Choi <yves1 at paran.com> wrote:
Dear all,
I am testing the Vanish for the reverse proxy for multilple domains.
Like as below diagram, When user access to 10.10.10.10 (request http host name with www.aaa.com<http://www.aaa.com> ,the Vanish foreard the request to www.aaa.com<http://www.aaa.com> backend server.
user 1 Domain www.aaa.com<http://www.aaa.com>
user 2 Vanish (10.10.10.x) Domain www.bbb.com<http://www.bbb.com>
user 3 Domain www.ccc.com<http://www.ccc.com>
I looked up the main page but can't find a right sample for this configuration.
This is a configuration that I add in the default vcl file.
When I start the vanishd with below configuration , I got an error.
Please let me know what I made a mistake.
Regards,
Yves
---------------- error messages ---------------------
Expected one of
'acl', 'sub', 'backend', or 'director'
Found: 'if' at
(input Line 16 Pos 1)
if (req.http.host ~ "^(www.)?aaa.com$<http://www.%29?aaa.com$>") {
##-----------------------------------------
Running VCC-compiler failed, exit 1
VCL compilation failed
--------------------------------------------------------
------------ VCL Configuration ----------------------
backend aaa {
.host = "1.1.1.1";
.port = "80";
}
backend bbb {
.host = "2.2.2.2.";
.port = "80";
}
if (req.http.host ~ "^(www.)?aaa.com$<http://www.%29?aaa.com$>") {
set req.http.host = "www.aaa.com<http://www.aaa.com>";
set req.backend = aaar;
} else if (req.http.host ~ "^(www.)?bbb.com$<http://www.%29?bbb.com$>" {
set req.http.host = "www.bbb.<http://www.bbb.>cpm";
set req.backend = bbb;}
else {
req.backend = default.;
}
}
[http://mailimg.kthimg.com/paran/footer/mail_banner_100201.gif]<http://mail.paran.com/event/mail/?tab=5&p_eye=mail%5Esms%5Esms%5Emai%5Ebanner_0501>
[http://mailimg.kthimg.com/paran/footer/mail_banner_100201.gif]<http://mail.paran.com/event/mail/?tab=5&p_eye=mail^sms^sms^mai^banner_0501>
[http://mail71.paran.com/read/put_ack.php?hp=L0Q3MS95L3YvMS95dmVzMUBwYXJhbi5jb20vLkNvbmZpcm0vMTI3OTUwMjcyOC4xNjc5My5tYWlsNzF4MQ==&from=yves1@paran.com&to=varnish-misc@varnish-cache.org________________________________________________________________________________________________________________________]
________________________________
This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/about-us-legal-email-disclaimer.htm for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you.
_______________________________________________
varnish-misc mailing list
varnish-misc at varnish-cache.org
http://lists.varnish-cache.org/mailman/listinfo/varnish-misc
This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/about-us-legal-email-disclaimer.htm for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you.
More information about the varnish-misc
mailing list