Index: server/core.c =================================================================== --- server/core.c (revision 519885) +++ server/core.c (working copy) @@ -1124,10 +1124,16 @@ if (err != NULL) { return err; } - - /* TODO: ap_configtestonly && ap_docrootcheck && */ + + //When ap_document_root_check is false; skip all the stuff below + if (!ap_document_root_check) { + conf->ap_document_root = arg; + return NULL; + } + + /* TODO: ap_configtestonly */ /* XXX Shouldn't this be relative to ServerRoot ??? */ - if (apr_filepath_merge((char**)&conf->ap_document_root, NULL, arg, + else if (apr_filepath_merge((char**)&conf->ap_document_root, NULL, arg, APR_FILEPATH_TRUENAME, cmd->pool) != APR_SUCCESS || !ap_is_directory(cmd->pool, arg)) { if (cmd->server->is_virtual) { Index: server/main.c =================================================================== --- server/main.c (revision 519885) +++ server/main.c (working copy) @@ -285,7 +285,7 @@ pad); #endif ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, - " %s [-v] [-V] [-h] [-l] [-L] [-t] [-S]", pad); + " %s [-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S]", pad); ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Options:"); @@ -360,10 +360,15 @@ " -S : a synonym for -t -D DUMP_VHOSTS"); ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -t : run syntax check for config files"); - + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, + " -T : start without DocumentRoot(s) check"); + destroy_and_exit_process(process, 1); } +//Set ap_document_root_check to default value: true +int ap_document_root_check = 1; + int main(int argc, const char * const argv[]) { char c; @@ -501,7 +506,11 @@ case 't': configtestonly = 1; break; - + + case 'T': + ap_document_root_check = 0; + break; + case 'S': configtestonly = 1; new = (char **)apr_array_push(ap_server_config_defines); Index: include/http_main.h =================================================================== --- include/http_main.h (revision 519885) +++ include/http_main.h (working copy) @@ -23,7 +23,7 @@ * in apr_getopt() format. Use this for default'ing args that the MPM * can safely ignore and pass on from its rewrite_args() handler. */ -#define AP_SERVER_BASEARGS "C:c:D:d:E:e:f:vVlLtSh?X" +#define AP_SERVER_BASEARGS "C:c:D:d:E:e:f:vVlLtTSh?X" #ifdef __cplusplus extern "C" { @@ -49,6 +49,9 @@ * effect the server based on command line options */ AP_DECLARE_DATA extern apr_array_header_t *ap_server_config_defines; +/** Available integer for using -T switch */ +AP_DECLARE_DATA extern int ap_document_root_check; + APR_DECLARE_OPTIONAL_FN(int, ap_signal_server, (int *, apr_pool_t *)); #ifdef __cplusplus