Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

How can I separate cache for http and https in dispatcher

Avatar

Level 2

now the cache files through http and https drop on the same folder by following configuration, anyone know how to separate them to different places? thanks in advance

Alias / "/opt/dispatcher/cache/"

<Directory "/opt/dispatcher/cache/">
    <IfModule disp_apache2.c>
        # enable dispatcher for ALL request. if this is too restrictive,
        # move it to another location
        SetHandler dispatcher-handler
    </IfModule>

    Options FollowSymLinks
    AllowOverride None
</Directory>

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Jacky,

first of all please allow me the question, why you want to store the very same content on different places depeding on the type of protocol requesting it? Delivering the very same content via http and https makes sometimes sense, but caching it in 2 different locations definitly doesn't make sense then.

Regarding your question: create 2 virtual hosts ("mydomain" for http and "mydomain-https" for https) and and inside the "mydomain-https"-vhost rewrite the host header to a different name, e.g. "https"; then you can create multiple farms: a farm with /virtualhosts {"mydomain"} and another farm with /virtualhosts {"mydomain-https"}. Of course the docroots of the corresponding domains and farms must match.

Jörg

View solution in original post

3 Replies

Avatar

Correct answer by
Employee Advisor

Jacky,

first of all please allow me the question, why you want to store the very same content on different places depeding on the type of protocol requesting it? Delivering the very same content via http and https makes sometimes sense, but caching it in 2 different locations definitly doesn't make sense then.

Regarding your question: create 2 virtual hosts ("mydomain" for http and "mydomain-https" for https) and and inside the "mydomain-https"-vhost rewrite the host header to a different name, e.g. "https"; then you can create multiple farms: a farm with /virtualhosts {"mydomain"} and another farm with /virtualhosts {"mydomain-https"}. Of course the docroots of the corresponding domains and farms must match.

Jörg

Avatar

Level 2

thank you Jörg,  also thanks Yogesh's help, somehow I have to add following setting what the blog mentioned or dispatcher cannot find corresponding farm, but it works on my colleague's box.  

#this is responsible for forwarding SSL request to another farm
<Location />
RequestHeader set Host "ssl.localhost.com"
</Location>