jim 99/06/29 08:13:14
Modified: htdocs/manual invoking.html
src CHANGES
src/include http_conf_globals.h
src/main http_core.c http_main.c
Log:
Add a new command-line option -T that's the same as -t, but it does
not do DirectoryRoot checking. This assumes:
1. command-line options are prefered over Config directives
2. we want to maintain current behavior while making
life easier for mass vhosting
3. everybody's happy
I leave the decision to whether apachectl should use -t or -T
to others.
Revision Changes Path
1.26 +11 -1 apache-1.3/htdocs/manual/invoking.html
Index: invoking.html
===================================================================
RCS file: /export/home/cvs/apache-1.3/htdocs/manual/invoking.html,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- invoking.html 1999/02/05 09:22:42 1.25
+++ invoking.html 1999/06/29 15:13:07 1.26
@@ -117,7 +117,17 @@
<DD>Test the configuration file syntax (<EM>i.e.</EM>, read all
configuration files
and interpret them) but do not start the server. If the configuration
contains
errors, display an error message and exit with a non-zero exit status,
-otherwise display "Syntax OK" and terminate with a zero exit status.
+otherwise display "Syntax OK" and terminate with a zero exit status. This
+command checks to see if all DocumentRoot entries exist and are directories.
+For sites with many vhosts, this is expensive; consider the <CODE>-T</CODE>
+command instead.
+
+<DT><CODE>-T</CODE>
+<DD>Test the configuration file syntax (<EM>i.e.</EM>, read all
configuration files
+and interpret them) but do not start the server. If the configuration
contains
+errors, display an error message and exit with a non-zero exit status,
+otherwise display "Syntax OK" and terminate with a zero exit status. This
+command does not perform any checking of the DocumentRoot entries.
<DT><CODE>-k</CODE> <EM>option</EM>
<DD>Windows only: signal Apache to restart or shutdown. <EM>option</EM>
1.1390 +5 -2 apache-1.3/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
retrieving revision 1.1389
retrieving revision 1.1390
diff -u -r1.1389 -r1.1390
--- CHANGES 1999/06/29 14:27:39 1.1389
+++ CHANGES 1999/06/29 15:13:08 1.1390
@@ -22,13 +22,16 @@
*) Fix apxs build issues on AIX
[Rasmus Lerdorf <[EMAIL PROTECTED]>]
- *) STARTUP BEHAVIOR CHANGE: Under previous versions, when Apache
+ *) DocumentRoot Checking: Under previous versions, when Apache
first started up, it used to do a stat of each DocumentRoot to
see if it existed and was a directory. If not, then an error
message was printed. THIS HAS BEEN DISABLED. If DocumentRoot
does not exist, you will get error messages in error_log. If
the '-t' command line option is used (to check the configuration)
- the check of DocumentRoot IS performed. [Jim Jagielski]
+ the check of DocumentRoot IS performed. An additional command
+ line option, '-T', has been added if you want to avoid the
+ DocumentRoot check even when checking the configuration.
+ [Jim Jagielski]
*) Win32: The query switch "apache -S" didn't exit after showing the
vhost settings. That was inconsistent with the other query functions.
1.39 +1 -0 apache-1.3/src/include/http_conf_globals.h
Index: http_conf_globals.h
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/include/http_conf_globals.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- http_conf_globals.h 1999/06/24 16:38:41 1.38
+++ http_conf_globals.h 1999/06/29 15:13:11 1.39
@@ -68,6 +68,7 @@
extern int ap_standalone;
extern int ap_configtestonly;
+extern int ap_docrootcheck;
extern uid_t ap_user_id;
extern char *ap_user_name;
extern gid_t ap_group_id;
1.269 +1 -1 apache-1.3/src/main/http_core.c
Index: http_core.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
retrieving revision 1.268
retrieving revision 1.269
diff -u -r1.268 -r1.269
--- http_core.c 1999/06/28 22:38:25 1.268
+++ http_core.c 1999/06/29 15:13:12 1.269
@@ -1047,7 +1047,7 @@
}
arg = ap_os_canonical_filename(cmd->pool, arg);
- if (ap_configtestonly && !ap_is_directory(arg)) {
+ if (ap_configtestonly && ap_docrootcheck && !ap_is_directory(arg)) {
if (cmd->server->is_virtual) {
fprintf(stderr, "Warning: DocumentRoot [%s] does not exist\n",
arg);
1.452 +11 -0 apache-1.3/src/main/http_main.c
Index: http_main.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/main/http_main.c,v
retrieving revision 1.451
retrieving revision 1.452
diff -u -r1.451 -r1.452
--- http_main.c 1999/06/29 14:27:42 1.451
+++ http_main.c 1999/06/29 15:13:12 1.452
@@ -231,6 +231,7 @@
int ap_standalone=0;
int ap_configtestonly=0;
+int ap_docrootcheck=1;
uid_t ap_user_id=0;
char *ap_user_name=NULL;
gid_t ap_group_id=0;
@@ -4747,7 +4748,12 @@
break;
case 't':
ap_configtestonly = 1;
+ ap_docrootcheck = 1;
break;
+ case 'T':
+ ap_configtestonly = 1;
+ ap_docrootcheck = 0;
+ break;
case 'h':
usage(argv[0]);
case '?':
@@ -6255,6 +6261,11 @@
break;
case 't':
ap_configtestonly = 1;
+ ap_docrootcheck = 1;
+ break;
+ case 'T':
+ ap_configtestonly = 1;
+ ap_docrootcheck = 0;
break;
case 'h':
usage(ap_server_argv0);