-/* Taken from server/core.c */
-static int set_document_root(request_rec *r, const char *arg)
-{
- void *sconf = r->server->module_config;
- core_server_config *conf = ap_get_module_config(sconf, &core_module);
-
- /* Make it absolute, relative to ServerRoot */
- arg = ap_server_root_relative(r->pool, arg);
-
- if (arg == NULL) {
- ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
- "[mod_vhost_ldap.c] set_document_root: DocumentRoot [%s] must be a directory",
- arg);
-
- return HTTP_INTERNAL_SERVER_ERROR;
- }
-
- /* TODO: ap_configtestonly && ap_docrootcheck && */
- if (apr_filepath_merge((char**)&conf->ap_document_root, NULL, arg,
- APR_FILEPATH_TRUENAME, r->pool) != APR_SUCCESS
- || !ap_is_directory(r->pool, arg)) {
-
- ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0,
- r,
- "[mod_vhost_ldap.c] set_document_root: Warning: DocumentRoot [%s] does not exist",
- arg);
- conf->ap_document_root = arg;
- }
- return OK;
-}
-
-