Hi all,
In the example dispatcher configuration there is a setting called DispatcherDeclineRoot which has a comment saying: if turned to 1, request to / are not handled by the dispatcher, use the mod_alias then for the correct mapping. Can anyone explain how to use mod_alias in combination with the dispatcher module? For example, how can I configure it to serve static content for a specific alias and go to CQ for other requests? Can someone provide an example configuration?
Many thanks,
Jan
if you'd like certain paths to be ignored by dispatcher, exclude them in the filter statement in dispatcher.any. since the security checklist recommends having dispatcher ignore everything, and then selectively add a whitelist of paths to be processed by CQ, this should solve your issue:
/filter
{
/0001
{
/glob "*"
/type "deny"
}
/0002
{
# processed by CQ
/glob "/content/mysite*"
/type "allow"
}
}
I'm sorry for the confusion, but that is not the issue I'm trying to solve. What I'm trying to achieve is to have my Apache web server serve certain content directly from Apache, and send all other requests into the dispatcher and on to CQ. For example, serve www.example.com/oldhtml directly from Apache, and the rest from CQ/dispatcher. According to the example dispatcher configuration this can be done using mod_alias in Apache, and I'm looking for an example configuration for this.
Thanks,
Jan
the example i provided solves your issue. all requests not matching an "allow" filter in the dispatcher configuration will be served by apache instead. therefore, if you deny everything via dispatcher filter (a security checklist requirement), and selectively add paths to be served by CQ (e.g. allow /content/mysite), /oldhtml will be implicitly served by apache. what do you need mod_alias for?
Hi,
It still doesn't quite work the way I want it to... Indeed, when you deny it in the dispatcher config, apache is trying to serve it. However, apache is looking for the file under /var/www/html which is the docroot configured in the dispatcher config. But my files are somewhere else, and there's an Alias defined for this in my apache config file. For some reason apache is not using this alias definition, the dispatcher docroot setting seems to be taking precedence. I tried several of the dispatcher settings (like DispatcherDeclineRoot and DispatcherUseProcessedURL) but to no avail. The reason why I'm not just putting my static files under /var/www/html is because I don't want them to get mixed up with the CQ cache. I want to be able to clear everything in the cache without touching these files I want to serve statically.
Any thoughts?
Regards,
Jabn
Hi,
I'm sorry for the late reply, I've been away for a while.
I guess that indeed all paths are handled by the dispatcher, I just did a basic dispatcher setup. How can I configure what paths need to be handled by Apache and what paths need to go to the dispatcher? Could you give me some pointers?
Many thanks,
Jan
North America
Europe, Middle East and Africa
Asia Pacific