2 * mod_domaintree.c - Apache2
6 * Copyright 2005 Michael Wallner <mike@iworks.at>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
22 * DomainTreeEnabled On
23 * DomainTreeMaxdepth 25
24 * DomainTreeStripWWW On
25 * DomainTreePrefix /sites
26 * DomainTreeSuffix /html
28 * DomainTreeAliasRecursion Off
29 * DomainTreeAlias /??/exmaple /com/exmaple
30 * DomainTreeAlias /???/example /com/example
31 * DomainTreeAlias /*one/ /anyone/
32 * DomainTreeIgnore *.foo.com *.foo.co.uk
33 * DomainTreeForbid html.*
34 * <Directory "/sites/.../home">
60 #define MODULE "mod_domaintree"
61 #define AUTHOR "<mike@iworks.at>"
69 #include "apr_tables.h"
70 #include "apr_strings.h"
76 #define APR_WANT_MEMFUNC
77 #define APR_WANT_STRFUNC
81 #include "http_config.h"
82 #include "http_core.h"
84 #include "http_protocol.h"
85 #include "http_request.h"
88 /* {{{ domaintree_module */
90 module AP_MODULE_DECLARE_DATA domaintree_module
;
93 /* {{{ Macros & Types */
95 #ifndef HAVE_UNIX_SUEXEC
97 # define HAVE_UNIX_SUEXEC
100 #ifdef HAVE_UNIX_SUEXEC
106 #define MDT_CNF domaintree_conf
107 #define MDT_PTR (&domaintree_module)
109 #define GET_MDT_CNF(srv) ((MDT_CNF *) ap_get_module_config((srv)->module_config, MDT_PTR))
111 #define IF_SET_ELSE(a, b) (a != -1) ? (a) : (b)
114 #define EMPTY(str) ((str == NULL) || (*(str) == NUL))
116 # define local static
118 # define local static APR_INLINE
121 #define DT_LOG_ERR APLOG_MARK, APLOG_ERR, APR_SUCCESS, DT->server, "DomainTree: "
122 #define DT_LOG_WRN APLOG_MARK, APLOG_WARNING, APR_SUCCESS, DT->server, "DomainTree: "
123 #define DT_LOG_DBG APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, DT->server, "DomainTree: "
129 apr_table_t
*faketable
;
143 apr_global_mutex_t
*lock
;
146 typedef apr_array_header_t
*hostlist_t
;
160 #ifdef HAVE_UNIX_SUEXEC
168 local
char *domaintree_cache_get(MDT_CNF
*DT
, apr_time_t atime
, const char *host
)
171 dircache_entry_t
*cache_entry
;
173 apr_global_mutex_lock(DT
->dircache
.lock
);
175 if ((cache_entry
= apr_hash_get(DT
->dircache
.hmap
, host
, APR_HASH_KEY_STRING
))) {
176 cache_entry
->lacc
= atime
;
177 path
= cache_entry
->path
;
180 apr_global_mutex_unlock(DT
->dircache
.lock
);
183 ap_log_error(DT_LOG_DBG
"cache hit = %s for %s", path
, host
);
189 local
void domaintree_cache_set(MDT_CNF
*DT
, apr_time_t atime
, const char *host
, const char *path
)
192 dircache_entry_t
*cache_entry
;
194 apr_pool_create(&pool
, DT
->dircache
.pool
);
195 cache_entry
= apr_palloc(pool
, sizeof(dircache_entry_t
));
197 cache_entry
->pool
= pool
;
198 cache_entry
->lacc
= atime
;
199 cache_entry
->host
= apr_pstrdup(pool
, host
);
200 cache_entry
->path
= apr_pstrdup(pool
, path
);
202 apr_global_mutex_lock(DT
->dircache
.lock
);
204 if (apr_hash_count(DT
->dircache
.hmap
) >= DT
->dircache
.clim
) {
205 apr_hash_index_t
*idx
;
206 dircache_entry_t
*purge_this
= NULL
;
208 ap_log_error(DT_LOG_WRN
"reached cache limit (%ld)", DT
->dircache
.clim
);
210 for (idx
= apr_hash_first(DT
->dircache
.pool
, DT
->dircache
.hmap
); idx
; idx
= apr_hash_next(idx
)) {
211 dircache_entry_t
*current
;
213 apr_hash_this(idx
, NULL
, NULL
, (void *) ¤t
);
214 if ((!purge_this
) || (purge_this
->lacc
> current
->lacc
)) {
215 purge_this
= current
;
220 ap_log_error(DT_LOG_DBG
"cache del = %s", purge_this
->host
);
221 apr_hash_set(DT
->dircache
.hmap
, purge_this
->host
, APR_HASH_KEY_STRING
, NULL
);
222 apr_pool_destroy(purge_this
->pool
);
225 apr_hash_set(DT
->dircache
.hmap
, cache_entry
->host
, APR_HASH_KEY_STRING
, cache_entry
);
227 apr_global_mutex_unlock(DT
->dircache
.lock
);
229 ap_log_error(DT_LOG_DBG
"cache set = %s for %s", path
, host
);
235 local
char *strtr(char *string
, char from
, char to
)
240 while ((ptr
= strchr(ptr
, from
))) {
249 #define TRIM_BOTH (TRIM_LEFT|TRIM_RIGHT)
250 local
char *trim(char *string
, size_t length
, char what
, int where
)
252 if (where
& TRIM_RIGHT
) {
253 while (length
-- && (string
[length
] == what
)) {
254 string
[length
] = NUL
;
257 if (where
& TRIM_LEFT
) {
258 while (*string
== what
) {
265 local
int strmatch(const char *match
, const char *string
, const char **begin
, const char **end
)
267 *begin
= *end
= NULL
;
269 while (*match
&& *string
)
274 while (*match
== '*' || *match
== '?') {
283 *end
= string
+ strlen(string
);
287 if (!(string
= strchr(string
, *match
))) {
302 if (*match
== *string
) {
322 local
char *struniqchr(char *string
, char uniq
)
327 if (ptr
[0] == uniq
&& ptr
[1] == uniq
) {
330 for (; pos
[1] == uniq
; ++pos
);
331 for (; pos
[0]; ++pos
) {
341 local
char *domaintree_host(apr_pool_t
*pool
, MDT_CNF
*DT
, const char *host_name
)
346 if (EMPTY(host_name
)) {
347 ap_log_error(DT_LOG_WRN
"no host/server name");
352 host
= apr_pstrdup(pool
, host_name
);
354 /* check for :NN port */
355 if ((port
= strchr(host
, ':'))) {
362 /* strip leading & trailing dots */
363 host
= trim(host
, len
, '.', TRIM_BOTH
);
365 ap_log_error(DT_LOG_DBG
"host name = %s for %s", host
, host_name
);
370 local
char *domaintree_path(apr_pool_t
*pool
, MDT_CNF
*DT
, const char *host_name
)
372 long depth
= 0, maxdepth
= IF_SET_ELSE(DT
->maxdepth
, 20);
373 const char *host
= host_name
;
374 char *path
= NULL
, *host_ptr
;
376 while ((host_ptr
= strchr(host
, '.'))) {
378 /* check max depth */
379 if (++depth
> maxdepth
) {
380 ap_log_error(DT_LOG_ERR
"maxdepth exceeded (%ld)", maxdepth
);
385 if (host_ptr
- host
) {
388 if ((DT
->stripwww
> 0) && (depth
== 1) && (!strncmp(host
, "www.", sizeof("www")))) {
389 ap_log_error(DT_LOG_DBG
"strip www");
391 path
= apr_pstrcat(pool
, apr_pstrndup(pool
, host
, host_ptr
- host
), "/", path
, NULL
);
398 /* append last part if any and duplicate full path */
400 path
= apr_pstrcat(pool
, host
, "/", path
, NULL
);
403 ap_log_error(DT_LOG_DBG
"path name = %s for %s", path
, host_name
);
408 local
void domaintree_fake(apr_pool_t
*pool
, MDT_CNF
*DT
, char **path
)
412 apr_pool_t
*local_pool
;
413 const apr_array_header_t
*header
= apr_table_elts(DT
->aliases
.faketable
);
414 apr_table_entry_t
*array
= (apr_table_entry_t
*) header
->elts
;
416 if (APR_SUCCESS
!= apr_pool_create(&local_pool
, pool
)) {
423 if (recurlevel
++ > DT
->aliases
.recursion
) {
424 ap_log_error(DT_LOG_ERR
"maximum alias recursion level (%ld) exceeded! Check if you have recursive definitions of DomainTreeAlias directives.", DT
->aliases
.recursion
);
428 for (i
= 0; i
< header
->nelts
; ++i
) {
429 const char *begin
, *end
;
431 ap_log_error(DT_LOG_DBG
"fake test = %s on %s", array
[i
].key
, *path
);
432 if (strmatch(array
[i
].key
, *path
, &begin
, &end
)) {
433 ap_log_error(DT_LOG_DBG
"fake done = %s (%s <> %s)", *path
, array
[i
].key
, array
[i
].val
);
434 *path
= apr_pstrcat(local_pool
, "/", apr_pstrndup(local_pool
, *path
, begin
- *path
), "/", array
[i
].val
, "/", end
, NULL
);
438 } while (more
&& (DT
->aliases
.recursion
> 0));
440 *path
= apr_pstrdup(pool
, struniqchr(*path
, '/'));
442 apr_pool_destroy(local_pool
);
445 #define TEST_IS_BOS 1
446 #define TEST_IS_EOS 2
447 #define TEST_IS_AOS 3
448 local
int domaintree_test(MDT_CNF
*DT
, const char *host
, int argc
, const char **argv
, int flags
, const char **bos
, const char **eos
)
452 const char *begin
, *end
, *host_end
= host
+ strlen(host
);
454 for (i
= 0; i
< argc
; ++i
) {
455 ap_log_error(DT_LOG_DBG
"host test = %s <> %s", argv
[i
], host
);
456 if (strmatch(argv
[i
], host
, &begin
, &end
)) {
457 if ((flags
& TEST_IS_BOS
) && begin
!= host
) {
460 if ((flags
& TEST_IS_EOS
) && end
!= host_end
) {
469 ap_log_error(DT_LOG_DBG
"test done = %s by %s", host
, argv
[i
]);
480 static STATUS
domaintree_hook_post_config(apr_pool_t
*pconf
, apr_pool_t
*plog
, apr_pool_t
*ptemp
, server_rec
*s
)
482 ap_add_version_component(pconf
, "MDT/" VERSION
);
486 static STATUS
domaintree_hook_translate_name(request_rec
*r
)
489 char *host
, *path
, *docroot
;
491 if ((!(DT
= GET_MDT_CNF(r
->server
))) || (DT
->enabled
< 1)) {
496 ap_log_error(DT_LOG_DBG
"processid = %d", (int) getpid());
499 /* get a usable host name */
500 if (!(host
= domaintree_host(r
->pool
, DT
, ap_get_server_name(r
)))) {
505 if (domaintree_test(DT
, host
, DT
->ignore
->nelts
, (const char **) DT
->ignore
->elts
, TEST_IS_AOS
, NULL
, NULL
)) {
510 if (domaintree_test(DT
, host
, DT
->forbid
->nelts
, (const char **) DT
->forbid
->elts
, TEST_IS_AOS
, NULL
, NULL
)) {
511 return HTTP_FORBIDDEN
;
515 if ((DT
->dircache
.clim
< 1) || (!(path
= domaintree_cache_get(DT
, r
->request_time
, host
)))) {
517 if (!(path
= domaintree_path(r
->pool
, DT
, host
))) {
521 /* apply any aliases */
522 if (apr_table_elts(DT
->aliases
.faketable
)->nelts
) {
523 domaintree_fake(r
->pool
, DT
, &path
);
527 if (DT
->dircache
.clim
> 0) {
528 domaintree_cache_set(DT
, r
->request_time
, host
, path
);
532 /* compose virtual docroot */
533 docroot
= struniqchr(apr_pstrcat(r
->pool
, DT
->prefix
, "/", path
, "/", DT
->suffix
, "/", NULL
), '/');
536 if (DT
->statroot
> 0) {
539 switch (apr_stat(&sb
, docroot
, APR_FINFO_MIN
, r
->pool
)) {
542 ap_log_error(DT_LOG_DBG
"stat path = %s (success)", docroot
);
546 ap_log_error(DT_LOG_DBG
"stat path = %s (failure)", docroot
);
551 /* set virtual docroot */
552 apr_table_set(r
->subprocess_env
, "VIRTUAL_DOCUMENT_ROOT", docroot
);
554 #ifdef HAVE_UNIX_SUEXEC
555 /* set suexec note */
557 const char *username
, *separator
;
559 if (domaintree_test(DT
, docroot
, DT
->suexec
->nelts
, DT
->suexec
->elts
, TEST_IS_BOS
, NULL
, &username
)) {
560 if ((separator
= strchr(username
, '/'))) {
561 username
= apr_pstrndup(r
->pool
, username
, separator
-username
);
563 username
= apr_pstrdup(r
->pool
, username
);
565 apr_table_setn(r
->notes
, "mod_domaintree.suexec", username
);
571 r
->canonical_filename
= "";
572 r
->filename
= apr_pstrcat(r
->pool
, docroot
, EMPTY(r
->uri
) ? NULL
: ('/' == *r
->uri
? r
->uri
+ 1 : r
->uri
), NULL
);
574 ap_log_error(DT_LOG_DBG
"path done = %s", r
->filename
);
579 #ifdef HAVE_UNIX_SUEXEC
580 static STATUS
domaintree_hook_get_suexec_identity(const request_rec
*r
)
582 ap_unix_identity_t
*ugid
= NULL
;
584 const char *username
;
586 if ((username
= apr_table_get(r
->notes
, "mod_domaintree.suexec"))) {
587 if ((ugid
= apr_palloc(r
->pool
, sizeof(*ugid
)))) {
588 if (APR_SUCCESS
== apr_uid_get(&ugid
->uid
, &ugid
->gid
, username
, r
->pool
)) {
598 static void domaintree_hooks(apr_pool_t
*pool
)
600 static const char * const pre
[] = {"mod_alias.c", "mod_userdir.c", NULL
};
602 ap_hook_post_config(domaintree_hook_post_config
, NULL
, NULL
, APR_HOOK_MIDDLE
);
603 ap_hook_translate_name(domaintree_hook_translate_name
, pre
, NULL
, APR_HOOK_FIRST
);
604 #ifdef HAVE_UNIX_SUEXEC
605 ap_hook_get_suexec_identity(domaintree_hook_get_suexec_identity
, NULL
, NULL
, APR_HOOK_FIRST
);
610 /* {{{ Configuration */
612 static void *domaintree_create_srv(apr_pool_t
*p
, server_rec
*s
)
614 MDT_CNF
*DT
= (MDT_CNF
*) apr_palloc(p
, sizeof(MDT_CNF
));
622 DT
->prefix
= "/var/www";
623 DT
->suffix
= "public_html";
625 DT
->ignore
= apr_array_make(p
, 0, sizeof(char *));
626 DT
->forbid
= apr_array_make(p
, 0, sizeof(char *));
627 #ifdef HAVE_UNIX_SUEXEC
628 DT
->suexec
= apr_array_make(p
, 0, sizeof(char *));
631 DT
->aliases
.recursion
= -1;
632 DT
->aliases
.faketable
= apr_table_make(p
, 0);
634 DT
->dircache
.clim
= -1;
635 DT
->dircache
.hmap
= apr_hash_make(p
);
636 apr_pool_create(&DT
->dircache
.pool
, p
);
637 apr_global_mutex_create(&DT
->dircache
.lock
, __FILE__
, APR_LOCK_DEFAULT
, p
);
639 fprintf(stderr
, "MDT: cfg create %p\n", DT
);
644 static void *domaintree_merge_srv(apr_pool_t
*p
, void *old_cfg_ptr
, void *new_cfg_ptr
)
646 MDT_CNF
*old_cfg
= (MDT_CNF
*) old_cfg_ptr
, *new_cfg
= (MDT_CNF
*) new_cfg_ptr
;
647 MDT_CNF
*DT
= (MDT_CNF
*) apr_palloc(p
, sizeof(MDT_CNF
));
649 DT
->server
= new_cfg
->server
;
650 DT
->enabled
= IF_SET_ELSE(new_cfg
->enabled
, old_cfg
->enabled
);
651 DT
->stripwww
= IF_SET_ELSE(new_cfg
->stripwww
, old_cfg
->stripwww
);
652 DT
->statroot
= IF_SET_ELSE(new_cfg
->statroot
, old_cfg
->statroot
);
653 DT
->maxdepth
= IF_SET_ELSE(new_cfg
->maxdepth
, old_cfg
->maxdepth
);
655 DT
->prefix
= EMPTY(new_cfg
->prefix
) ? EMPTY(old_cfg
->prefix
) ? "/var/www" : old_cfg
->prefix
: new_cfg
->prefix
;
656 DT
->suffix
= EMPTY(new_cfg
->suffix
) ? EMPTY(old_cfg
->suffix
) ? "public_html" : old_cfg
->suffix
: new_cfg
->suffix
;
658 DT
->ignore
= apr_array_append(p
, new_cfg
->ignore
, old_cfg
->ignore
);
659 DT
->forbid
= apr_array_append(p
, new_cfg
->forbid
, old_cfg
->forbid
);
660 #ifdef HAVE_UNIX_SUEXEC
661 DT
->suexec
= apr_array_append(p
, new_cfg
->suexec
, old_cfg
->suexec
);
664 DT
->aliases
.recursion
= IF_SET_ELSE(new_cfg
->aliases
.recursion
, old_cfg
->aliases
.recursion
);
665 DT
->aliases
.faketable
= apr_table_overlay(p
, new_cfg
->aliases
.faketable
, old_cfg
->aliases
.faketable
);
667 DT
->dircache
.clim
= IF_SET_ELSE(new_cfg
->dircache
.clim
, old_cfg
->dircache
.clim
);
668 DT
->dircache
.hmap
= apr_hash_overlay(p
, new_cfg
->dircache
.hmap
, old_cfg
->dircache
.hmap
);
669 apr_global_mutex_create(&new_cfg
->dircache
.lock
, __FILE__
, APR_LOCK_DEFAULT
, p
);
671 fprintf(stderr
, "MDT: cfg merge %p + %p = %p\n", old_cfg
, new_cfg
, DT
);
676 static const char *domaintree_init_enable(cmd_parms
*cmd
, void *conf
, int flag
)
678 GET_MDT_CNF(cmd
->server
)->enabled
= flag
;
682 static const char *domaintree_init_stripwww(cmd_parms
*cmd
, void *conf
, int flag
)
684 GET_MDT_CNF(cmd
->server
)->stripwww
= flag
;
688 static const char *domaintree_init_statroot(cmd_parms
*cmd
, void *conf
, int flag
)
690 GET_MDT_CNF(cmd
->server
)->statroot
= flag
;
694 static const char *domaintree_init_prefix(cmd_parms
*cmd
, void *conf
, const char *prefix
)
696 GET_MDT_CNF(cmd
->server
)->prefix
= EMPTY(prefix
) ? "/" : trim(apr_pstrdup(cmd
->pool
, prefix
), strlen(prefix
), '/', TRIM_RIGHT
);
700 static const char *domaintree_init_suffix(cmd_parms
*cmd
, void *conf
, const char *suffix
)
702 GET_MDT_CNF(cmd
->server
)->suffix
= EMPTY(suffix
) ? "" : trim(apr_pstrdup(cmd
->pool
, suffix
), strlen(suffix
), '/', TRIM_BOTH
);
706 static const char *domaintree_init_maxdepth(cmd_parms
*cmd
, void *conf
, const char *max_depth
)
710 if ((depth
= atol(max_depth
))) {
712 GET_MDT_CNF(cmd
->server
)->maxdepth
= depth
;
714 return "Maximum DomainTree depth cannot be negative.";
721 static const char *domaintree_init_aliasrecursion(cmd_parms
*cmd
, void *conf
, const char *alias_recursion
)
725 if ((recursion
= atol(alias_recursion
))) {
726 if (recursion
>= 0L) {
727 GET_MDT_CNF(cmd
->server
)->aliases
.recursion
= recursion
;
729 return "DomainTree alias recursion cannot be negative.";
736 static const char *domaintree_init_alias(cmd_parms
*cmd
, void *conf
, const char *fake
, const char *real
)
738 char *f
= strtr(apr_pstrdup(cmd
->pool
, fake
), '.', '/'), *r
= strtr(apr_pstrdup(cmd
->pool
, real
), '.', '/');
740 apr_table_set(GET_MDT_CNF(cmd
->server
)->aliases
.faketable
, trim(f
, strlen(f
), '/', TRIM_BOTH
), trim(r
, strlen(r
), '/', TRIM_BOTH
));
745 static const char *domaintree_init_cache(cmd_parms
*cmd
, void *conf
, const char *cache
)
749 if ((limit
= atol(cache
))) {
751 GET_MDT_CNF(cmd
->server
)->dircache
.clim
= limit
;
753 return "DomainTree cache limit cannot be negative.";
760 static const char *domaintree_init_ignore(cmd_parms
*cmd
, void *conf
, const char *ignore
)
762 *((char **) apr_array_push(GET_MDT_CNF(cmd
->server
)->ignore
)) = trim(apr_pstrdup(cmd
->pool
, ignore
), strlen(ignore
), '.', TRIM_BOTH
);
766 static const char *domaintree_init_forbid(cmd_parms
*cmd
, void *conf
, const char *forbid
)
768 *((char **) apr_array_push(GET_MDT_CNF(cmd
->server
)->forbid
)) = trim(apr_pstrdup(cmd
->pool
, forbid
), strlen(forbid
), '.', TRIM_BOTH
);
772 static const char *domaintree_init_suexec(cmd_parms
*cmd
, void *conf
)
774 #ifdef HAVE_UNIX_SUEXEC
778 return "DomainTreeSuexec is a per directory configuration directive";
781 switch (apr_stat(&sb
, cmd
->path
, APR_FINFO_MIN
, cmd
->pool
)) {
786 return "DomainTreeSuexec must be defined for an existing path";
789 *((char **) apr_array_push(GET_MDT_CNF(cmd
->server
)->suexec
)) = trim(apr_pstrdup(cmd
->pool
, cmd
->path
), strlen(cmd
->path
), '.', TRIM_BOTH
);
793 return "HAVE_UNIX_SUEXEC was undefined at compile time";
800 static command_rec domaintree_commands
[] = {
802 "DomainTreeEnabled", domaintree_init_enable
, NULL
, RSRC_CONF
,
803 "Turn the module on or off."
807 "DomainTreeStripWWW", domaintree_init_stripwww
, NULL
, RSRC_CONF
,
808 "Strip leading www from host. (default On)"
812 "DomainTreeStatRoot", domaintree_init_statroot
, NULL
, RSRC_CONF
,
813 "Wheter to check for the evaluated virtual document root with a stat call. (default Off)"
817 "DomainTreePrefix", domaintree_init_prefix
, NULL
, RSRC_CONF
,
818 "DomainTree path prefix. (default /var/www) Do not forget the leading slash!"
822 "DomainTreeSuffix", domaintree_init_suffix
, NULL
, RSRC_CONF
,
823 "DomainTree path suffix. (default public_html)"
827 "DomainTreeMaxdepth", domaintree_init_maxdepth
, NULL
, RSRC_CONF
,
828 "DomainTree max path depth. (default 20)"
832 "DomainTreeAliasRecursion", domaintree_init_aliasrecursion
, NULL
, RSRC_CONF
,
833 "Whether (and how often at the maximum) DomainTree should walk recursively "
834 "through the aliases list as long as matching aliases are found. (default: 0 = turned off)"
838 "DomainTreeAlias", domaintree_init_alias
, NULL
, RSRC_CONF
,
839 "DomainTree aliases; e.g. DomainTreeAlias com/example/tickets com/example/support (dots or slashes equal)"
843 "DomainTreeCache", domaintree_init_cache
, NULL
, RSRC_CONF
,
844 "DomainTree server-wide host to directory cache; specify how many cache entries to allow (default: 0 = turned off)"
848 "DomainTreeIgnore", domaintree_init_ignore
, NULL
, RSRC_CONF
,
849 "DomainTree ignored hosts; uses the same matching alogrithm like DomainTreeAlias"
853 "DomainTreeForbid", domaintree_init_forbid
, NULL
, RSRC_CONF
,
854 "DomanTree forbidden hosts; uses the same matching algorithm like DomainTreeAlias"
858 "DomainTreeSuexec", domaintree_init_suexec
, NULL
, ACCESS_CONF
,
859 "DomainTree user home directory; enable suexec hook for domain based user-dir hosting in this directory"
866 /* {{{ Module Administrativa */
868 module AP_MODULE_DECLARE_DATA domaintree_module
= {
869 STANDARD20_MODULE_STUFF
,
870 NULL
, /* create per-dir */
871 NULL
, /* merge per-dir */
872 domaintree_create_srv
, /* create per-server */
873 domaintree_merge_srv
, /* merge per-server */
874 domaintree_commands
, /* config commands */
875 domaintree_hooks
/* hooks */
885 * vim600: noet sw=4 ts=4 fdm=marker
886 * vim<600: noet sw=4 ts=4