Using this example, the following table shows the virtual hosts that are resolved for the given HTTP requests:
In docs.adobe.com, Dispatcher Configuration, the following example regarding "Virtual Host Resolution" seems to be incorrect.
From: https://docs.adobe.com/docs/en/dispatcher/disp-config.html#Example Virtual Host Resolution
/farms { /myProducts { /virtualhosts { "www.mycompany.com" } /renders { /hostname "server1.myCompany.com" /port "80" } } /myCompany { /virtualhosts { "www.mycompany.com/products/*" } /renders { /hostname "server2.myCompany.com" /port "80" } } }
I would expect the following:
/farms { /myProducts { /virtualhosts { "www.mycompany.com/products/*" } /renders { /hostname "server2.myCompany.com" /port "80" } } /myCompany { /virtualhosts { "www.mycompany.com" } /renders { /hostname "server1.myCompany.com" /port "80" } } }
Can you please confirm the rules are inverted?
Thanks,
Claudio
Solved! Go to Solution.
Views
Replies
Total Likes
document is correct. Because evaluation is bottom up.
Views
Replies
Total Likes
document is correct. Because evaluation is bottom up.
Views
Replies
Total Likes
Hi Sham,
Got it. In this case I would expect the example to be:
/farms { /myCompany { /virtualhosts { "www.mycompany.com" } /renders { /hostname "server1.myCompany.com" /port "80" } } /myProducts { /virtualhosts { "www.mycompany.com/products/*" } /renders { /hostname "server2.myCompany.com" /port "80" } } }
No functional difference, only the correct farm names to improve the overall clarity of the example itself. Correct?
Views
Replies
Total Likes
CLAUDIO RIVABENE wrote...
No functional difference, only the correct farm names to improve the overall clarity of the example itself. Correct?
agree & make sense.
Views
Replies
Total Likes
The example in the documentation shows the following table:
Using this example, the following table shows the virtual hosts that are resolved for the given HTTP requests:
Request URL | Resolved virtual host |
---|---|
http://www.mycompany.com/products/gloves.html | www.mycompany.com/products/* |
http://www.mycompany.com/about.html | www.mycompany.com |
However, that does not seem to match up with what the documentation says (for the second request):
Dispatcher finds the best-matching virtual host value in the following manner:
For the second request, it seems the 2nd rule above would kick in, meaning that the www.mycompany.com/products/* would be the resolved virtual host (scheme and uri don't match any virtualhosts - unless www.mycompany.com is interpreted as www.mycompany.com/*). Since the evaluation is bottom up, the host would match on the last virtualhost. What am I missing?
Views
Replies
Total Likes
Views
Likes
Replies