From: Martin Kraemer Date: Wed, 29 Aug 2001 13:32:07 +0000 (+0000) Subject: Parallel to a change in Apache-2.0, the manual directory was moved out of X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6f236653fe95955bd0b98eaf00edde8f52f965f;p=thirdparty%2Fapache%2Fhttpd.git Parallel to a change in Apache-2.0, the manual directory was moved out of the DocumentRoot tree to simplify the separation of private content&configuration from server's on-line documentation. An "Alias /manual/ ..." projects the manual/ directory (which resides now side-by-side with the icons/ directory) into the logical DocumentRoot. Note that a request to http://server/manual (without the trailing slash) will now behave different than before (it used to redirect to http://server/manual/ but no longer does). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@90782 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/Makefile.tmpl b/Makefile.tmpl index f20036fcfbe..83abbc92697 100644 --- a/Makefile.tmpl +++ b/Makefile.tmpl @@ -120,6 +120,7 @@ sysconfdir = @sysconfdir@ datadir = @datadir@ iconsdir = @iconsdir@ htdocsdir = @htdocsdir@ +manualdir = @manualdir@ cgidir = @cgidir@ includedir = @includedir@ localstatedir = @localstatedir@ @@ -270,6 +271,7 @@ install-mktree: $(MKDIR) $(root)$(mandir)/man8 $(MKDIR) $(root)$(sysconfdir) $(MKDIR) $(root)$(htdocsdir) + $(MKDIR) $(root)$(manualdir) $(MKDIR) $(root)$(iconsdir) $(MKDIR) $(root)$(cgidir) $(MKDIR) $(root)$(includedir) @@ -459,13 +461,20 @@ install-data: echo "[PRESERVING EXISTING DATA SUBDIR: $(root)$(htdocsdir)/]"; \ else \ echo "Copying tree $(TOP)/htdocs/ -> $(root)$(htdocsdir)/"; \ - (cd $(TOP)/htdocs/ && $(TAR) $(TAROPT) - *) |\ + (cd $(TOP)/htdocs/ && $(TAR) $(TAROPT) - index* apache_pb.* ) |\ (cd $(root)$(htdocsdir)/ && $(TAR) -xf -); \ find $(root)$(htdocsdir)/ -type d -exec chmod a+rx {} \; ; \ - find $(root)$(htdocsdir)/ -type f -exec chmod a+r {} \; ; \ + find $(root)$(htdocsdir)/ -type f -print | xargs chmod a+r ; \ + fi + -@if [ -d $(TOP)/htdocs/manual ]; then \ + echo "Copying tree $(TOP)/htdocs/manual -> $(root)/$(manualdir)/"; \ + (cd $(TOP)/htdocs/manual/ && $(TAR) $(TAROPT) - *) |\ + (cd $(root)$(manualdir)/ && $(TAR) -xf -); \ + find $(root)$(manualdir)/ -type d -exec chmod a+rx {} \; ; \ + find $(root)$(manualdir)/ -type f -print | xargs chmod a+r ; \ fi -@if [ -f $(root)$(cgidir)/printenv ]; then \ - echo "[PRESERVING EXISTING DATA SUBDIR: $(root)$(cgidir)/]"; \ + echo "[PRESERVING EXISTING CGI SUBDIR: $(root)$(cgidir)/]"; \ else \ for script in printenv test-cgi; do \ cat $(TOP)/cgi-bin/$${script} |\ @@ -504,6 +513,7 @@ install-config: cat $(TOP)/conf/$${conf}-dist ) |\ sed -e '/# LoadModule/r $(TOP)/$(SRC)/.apaci.install.conf' \ -e 's;@@ServerRoot@@/htdocs;$(htdocsdir);' \ + -e 's;@@ServerRoot@@/manual;$(manualdir);' \ -e 's;@@ServerRoot@@/icons;$(iconsdir);' \ -e 's;@@ServerRoot@@/cgi-bin;$(cgidir);' \ -e 's;@@ServerRoot@@/proxy;$(proxycachedir);' \ diff --git a/conf/highperformance.conf-dist b/conf/highperformance.conf-dist index d5a931359ec..97a7c50f0ca 100644 --- a/conf/highperformance.conf-dist +++ b/conf/highperformance.conf-dist @@ -1,6 +1,6 @@ # Ha, you're reading this config file looking for the easy way out! # "how do I make my apache server go really really fast??" -# Well you could start by reading the htdocs/manual/misc/perf-tuning.html +# Well you could start by reading the /manual/misc/perf-tuning.html # page. But, we'll give you a head start. # # This config file is small, it is probably not what you'd expect on a diff --git a/conf/httpd.conf-dist b/conf/httpd.conf-dist index 7b731aed70d..8aae7fe8e93 100644 --- a/conf/httpd.conf-dist +++ b/conf/httpd.conf-dist @@ -545,6 +545,19 @@ ServerSignature On Allow from all + # This Alias will project the on-line documentation tree into your + # logical DocumentRoot. Comment it if you don't want to provide access + # to the on-line docu for some reason. + # + Alias /manual/ "@@ServerRoot@@/manual/" + + + Options Indexes FollowSymlinks MultiViews + AllowOverride None + Order allow,deny + Allow from all + + # # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that diff --git a/conf/httpd.conf-dist-nw b/conf/httpd.conf-dist-nw index 05179a7fc0a..f642343ec39 100644 --- a/conf/httpd.conf-dist-nw +++ b/conf/httpd.conf-dist-nw @@ -480,6 +480,19 @@ ServerSignature On Allow from all + # This Alias will project the on-line documentation tree into your + # logical DocumentRoot. Comment it if you don't want to provide access + # to the on-line docu for some reason. + # + Alias /manual/ "sys:/apache/manual/" + + + Options Indexes FollowSymlinks MultiViews + AllowOverride None + Order allow,deny + Allow from all + + # # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that diff --git a/conf/httpd.conf-dist-win b/conf/httpd.conf-dist-win index 40fa7819703..9549ee4a3ba 100644 --- a/conf/httpd.conf-dist-win +++ b/conf/httpd.conf-dist-win @@ -548,6 +548,19 @@ ServerSignature On Allow from all + # This Alias will project the on-line documentation tree into your + # logical DocumentRoot. Comment it if you don't want to provide access + # to the on-line docu for some reason. + # + Alias /manual/ "@@ServerRoot@@/manual/" + + + Options Indexes FollowSymlinks MultiViews + AllowOverride None + Order allow,deny + Allow from all + + # # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that diff --git a/config.layout b/config.layout index d79741e2346..95906ccfe9d 100644 --- a/config.layout +++ b/config.layout @@ -21,6 +21,7 @@ datadir: $prefix iconsdir: $datadir/icons htdocsdir: $datadir/htdocs + manualdir: $datadir/manual cgidir: $datadir/cgi-bin includedir: $prefix/include localstatedir: $prefix @@ -42,6 +43,7 @@ datadir: $prefix/share+ iconsdir: $datadir/icons htdocsdir: $datadir/htdocs + manualdir: $datadir/manual cgidir: $datadir/cgi-bin includedir: $prefix/include+ localstatedir: $prefix/var+ @@ -142,6 +144,7 @@ datadir: $prefix/share iconsdir: $datadir/icons htdocsdir: $datadir/htdocs + manualdir: $datadir/manual cgidir: $datadir/cgi-bin includedir: $prefix/include localstatedir: /var$prefix @@ -162,6 +165,7 @@ datadir: $prefix iconsdir: $datadir/icons htdocsdir: $datadir/htdocs + manualdir: $datadir/manual cgidir: $datadir/cgi-bin includedir: $prefix/include localstatedir: $prefix @@ -182,6 +186,7 @@ datadir: /usr/local/httpd iconsdir: $datadir/icons htdocsdir: $datadir/htdocs + manualdir: $datadir/manual cgidir: $datadir/cgi-bin includedir: $prefix/include/apache localstatedir: /var @@ -202,6 +207,7 @@ datadir: $prefix iconsdir: $datadir/icons htdocsdir: $datadir/htdocs + manualdir: $datadir/manual cgidir: $datadir/cgi-bin includedir: $exec_prefix/include/apache localstatedir: /var @@ -222,6 +228,7 @@ datadir: /var/apache iconsdir: $datadir/icons htdocsdir: $datadir/htdocs + manualdir: $datadir/manual cgidir: $datadir/cgi-bin includedir: $exec_prefix/include localstatedir: $prefix @@ -242,6 +249,7 @@ datadir: $prefix iconsdir: $prefix/icons htdocsdir: $prefix/htdocs + manualdir: $prefix/manual cgidir: $prefix/cgi-bin includedir: $exec_prefix/lib/apache/include localstatedir: $prefix diff --git a/configure b/configure index d99303dbf48..58d953faee5 100755 --- a/configure +++ b/configure @@ -426,7 +426,8 @@ do echo " --sysconfdir=DIR install configuration files in DIR" echo " --datadir=DIR install read-only data files in DIR" echo " --iconsdir=DIR install read-only icon files in DIR" - echo " --htdocsdir=DIR install read-only document files in DIR" + echo " --htdocsdir=DIR install read-only welcome pages in DIR" + echo " --manualdir=DIR install read-only on-line documentation in DIR" echo " --cgidir=DIR install read-only cgi files in DIR" echo " --includedir=DIR install includes files in DIR" echo " --localstatedir=DIR install modifiable data files in DIR" @@ -499,8 +500,9 @@ do OOIFS="$IFS" # most likely not needed: jmj IFS="$DIFS" # ditto for var in prefix exec_prefix bindir sbindir libexecdir mandir \ - sysconfdir datadir iconsdir htdocsdir cgidir includedir \ - localstatedir runtimedir logfiledir proxycachedir; do + sysconfdir datadir iconsdir htdocsdir manualdir cgidir \ + includedir localstatedir runtimedir logfiledir \ + proxycachedir; do eval "val=\"\$$var\"" case $val in *+ ) @@ -673,6 +675,10 @@ do htdocsdir="$apc_optarg" autosuffix_htdocsdir=no ;; + --manualdir=*) + manualdir="$apc_optarg" + autosuffix_manualdir=no + ;; --cgidir=*) cgidir="$apc_optarg" autosuffix_cgidir=no @@ -1099,14 +1105,14 @@ fi ## ## expand path variables and make sure -## they do not end with a backslash +## they do not end in a backslash ## OIFS="$IFS" IFS="$DIFS" for var in prefix exec_prefix bindir sbindir libexecdir mandir \ - sysconfdir datadir iconsdir htdocsdir cgidir includedir \ - localstatedir runtimedir logfiledir proxycachedir \ - suexec_docroot suexec_logexec ; do + sysconfdir datadir iconsdir htdocsdir manualdir cgidir \ + includedir localstatedir runtimedir logfiledir \ + proxycachedir suexec_docroot suexec_logexec ; do eval "val=\"\$$var\""; val=`echo $val | sed -e 's:\(.\)/*$:\1:'` eval "$var=\"$val\"" @@ -1231,6 +1237,7 @@ if [ "x$show_layout" = "x1" ]; then echo " datadir: $datadir" echo " iconsdir: $iconsdir" echo " htdocsdir: $htdocsdir" + echo " manualdir: $manualdir" echo " cgidir: $cgidir" echo " includedir: $includedir" echo " localstatedir: $localstatedir" @@ -1302,6 +1309,7 @@ sed $mkf \ -e "s%@datadir@%$datadir%g" \ -e "s%@iconsdir@%$iconsdir%g" \ -e "s%@htdocsdir@%$htdocsdir%g" \ +-e "s%@manualdir@%$manualdir%g" \ -e "s%@cgidir@%$cgidir%g" \ -e "s%@localstatedir@%$localstatedir%g" \ -e "s%@includedir@%$includedir%g" \ diff --git a/src/CHANGES b/src/CHANGES index c6bb74d4831..8f2db5df690 100644 --- a/src/CHANGES +++ b/src/CHANGES @@ -1,5 +1,16 @@ Changes with Apache 1.3.21 + *) Parallel to a change in Apache-2.0, the manual directory was + moved out of the DocumentRoot tree to simplify the separation + of private content&configuration from server's on-line + documentation. An "Alias /manual/ ..." projects the manual/ + directory (which resides now side-by-side with the icons/ + directory) into the logical DocumentRoot. Note that a request + to http://server/manual (without the trailing slash) will now + behave different than before (it used to redirect to + http://server/manual/ but no longer does). + [Martin Kraemer] + *) Fixed ap_os_canonical_filename() so that it wouldn't try to canonicalize an invalid file name. Also fixed ap_os_is_path_absolute() so that it wouldn't recognize names