EXAMPLE 1 (shared blocks)
site1.com, site2.com {
tls me@example.com
}
site3.com, site4.com {
tls me@foo.com
}
site1.com, site2.com, site3.com, site4.com {
# ERROR, each directive can only be in one shared block!
}
site1.com {
root /some/path
}
site2.com {
root /some/path2
}
site3.com {
root /some/path3
}
site4.com {
root /some/path4
}
TRANSLATES INTO
site1.com {
root /some/path
tls me@example.com
}
site2.com {
root /some/path2
tls me@example.com
}
site3.com {
root /some/path3
tls me@foo.com
}
site4.com {
root /some/path4
tls me@foo.com
}
EXAMPLE 2 (path matching)
example.com {
root /path
}
example.com/static {
root /pathtostatic
}
EXAMPLE 3 (wildcards)
example.com {
}
*.example.com {
# applies to eg. foo.example.com, but not bar.foo.example.com. Wildcards only apply to 1 label level.
}
static.example.com {
root /pathtostatic
# is not effected by the block above because this is more specific and is used instead without inheritance of the above block.
}
*.foo.example.com, *.bar.example.com {
# shared
}
*.foo.example.com {
# stuff that only applies to *.foo.example.com
}
*.bar.example.com {
# stuff that only applies to *.bar.example.com
}