Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Dispatcher 4.2.1 dispatcher.any variables

Avatar

Level 1

Referring to the new feature that allows httpd variables to be used in dispatcher.any.
DISP-624 - Make httpd.conf variables available in dispatcher.any

If I include the same dispatcher.any file for multiple vhosts with different variable values, I am not seeing the dispatcher.any filters update dynamically based on which vhost is currently being hit.

e.g

vhost1Define sitea DispatcherConfig /etc/httpd/dispatcher.anyvhost2Define siteb DispatcherConfig /etc/httpd/dispatcher.anydispatcher.any filters/002 { /type "allow" /url "/content/${site}/*" } # enable public content

I would expect if hitting a url for vhost1 I could only access content for sitea, and if hitting a url for vhost2, only able to access siteb.

What I am seeing is that instead it is driven by which vhost is registered first. If vhost2 gets registered first then I can only access siteb. If I attempt to access sitea (through vhost1) the dispatcher filters out the request because it is not allowed.

Is this how it functions and is there any way around this without duplicating configs?

Edit: Seems like all dispatcher.any files pull from the same variable list so having different variables per vhost isn't possible since the first variable set is shared across all dispatcher.any configs.

0 Replies