Skip navigation

CQ5

Jan Amplexor
Currently Being Moderated

using mod_alias in combination with dispatcher

Jun 18, 2012 8:36 AM

Tags: #dispatcher

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

 
Replies
  • Currently Being Moderated
    Jun 18, 2012 8:48 AM   in reply to Jan Amplexor

    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"

      }

     

      }

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 18, 2012 10:28 AM   in reply to Jan Amplexor

    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?

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 22, 2012 2:31 AM   in reply to Jan Amplexor

    in your virtual host, you may need to adjust the  directive for the paths you want to be managed by apache's default handler. most likely you currently have dispatcher handling all paths in the vhost?

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points