Forum

cache control

chrisf
27 December 2015, 18:01
Hugo,

I know you answered this here:
https://www.hiawatha-webserver.org/forum/topic/2114

But I am at a loss on how to accomplish this across our shared hosting platform.

If I add a directory config for the virtual host main directory, will it also work recursively?

My panel uses a php template for the domain configs... I just don't understand this new way to do the ExpirePeriod.

Please help Hugo, Thank you.

It was simple with the toolkit option.

How do I get it to work across all the domains... I very well can't have a directory option for every single dir on my servers.
Hugo Leisink
29 December 2015, 00:40
Yes, it will work recursively. But, you will have to wait for v10.1 to get things working for you again. That version will have the Extensions option for a Directory setting:
Directory {
DirectoryID = expire
Path = /
ExpirePeriod = 1 month
Extensions = css, eot, gif, htm, html, ...
}

VirtualHost {
...
UseDirectory = expire
}
chrisf
29 December 2015, 06:06
Thank you for your reply. Another question. If the virtual host directory is set to /home/user/website.com/ will I need a Directory setting for every VH? or will the / work under this situation and I can just add the UseDirectory in my config template for each VH.
Hugo Leisink
31 December 2015, 10:02
The path in a directory section is the relative path for a virtual host. The website root directory in a virtual host has nothing to do with that. For every virtual host you want the directory settings to work, you have to add it to the UseDirectory setting.
This topic has been closed.