LightTPD

By | 7 Apr 2009

Include wildcard configuration files

Lighty doesn’t allow wildcarded inclusions of configuration files, but you can do a little trick using the include_shell command:

include_shell "cat /etc/lighttpd/conf.d/*conf"

# more elegant
include_shell "find /etc/lighttpd/conf.d -maxdepth 1 -name '*.conf' -exec cat {} \;"Code language: PHP (php)

Leave a Reply

Your email address will not be published. Required fields are marked *

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)