httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wilfredo Sanchez <wsanc...@apple.com>
Subject [PATCH] Conditionalize module-specific directives
Date Sat, 04 Dec 1999 04:37:29 GMT
  This patch conditionalizes directives which break when you disable  
a given module.  Handy because I like to enable/disable modules, and  
it's a pain to find each directive which keeps apache from  
restarting as a result of disabling a module.

  Disabling mod_access will still break the config file because  
fixing that one would require conditionals all over the place.

	-Fred


Index: httpd.conf-dist
===================================================================
RCS file: /cvs/Darwin/Services/apache/apache/conf/httpd.conf-dist,v
retrieving revision 1.1.1.5
diff -u -d -b -w -r1.1.1.5 httpd.conf-dist
--- httpd.conf-dist     1999/09/30 02:07:47     1.1.1.5
+++ httpd.conf-dist     1999/12/04 04:33:04
@@ -328,7 +328,9 @@
 # UserDir: The name of the directory which is appended onto a user's home
 # directory if a ~user request is received.
 #
+<IfModule mod_userdir.c>
 UserDir public_html
+</IfModule>

 #
 # Control access to UserDir directories.  The following is an example
@@ -351,7 +353,9 @@
 # DirectoryIndex: Name of the file or files to use as a pre-written HTML
 # directory index.  Separate multiple entries with spaces.
 #
+<IfModule mod_dir.c>
 DirectoryIndex index.html
+</IfModule>

 #
 # AccessFileName: The name of the file to look for in each directory
@@ -397,7 +401,9 @@
 # TypesConfig describes where the mime.types file (or equivalent) is
 # to be found.
 #
+<IfModule mod_mime.c>
 TypesConfig conf/mime.types
+</IfModule>

 #
 # DefaultType is the default MIME type the server will use for a document
@@ -495,6 +501,9 @@
 # Aliases: Add here as many aliases as you need (with no limit).  
The format is
 # Alias fakename realname
 #
+<IfModule mod_alias.c>
+
+#
 # Note that if you include a trailing / on fakename then the server will
 # require it to be present in the URL.  So "/icons" isn't aliased in this
 # example, only "/icons/"..
@@ -529,6 +538,9 @@
     Allow from all
 </Directory>

+</IfModule>
+# End of aliases.
+
 #
 # Redirect allows you to tell clients about documents which used to  
exist in
 # your server's namespace, but do not anymore. This allows you to  
tell the
@@ -539,6 +551,7 @@
 #
 # Directives controlling the display of server-generated directory  
listings.
 #
+<IfModule mod_autoindex.c>

 #
 # FancyIndexing is whether you want fancy directory indexing or standard
@@ -615,7 +628,15 @@
 #
 IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

+</IfModule>
+# End of indexing directives.
+
 #
+# Document types.
+#
+<IfModule mod_mime.c>
+
+#
 # AddEncoding allows you to have certain browsers (Mosaic/X 2.1+)  
uncompress
 # information on the fly. Note: Not all browsers support this.
 # Despite the name similarity, the following Add* directives have nothing
@@ -644,7 +665,9 @@
 # in case of a tie during content negotiation.
 # Just list the languages in decreasing order of preference.
 #
+<IfModule mod_negotiation.c>
 LanguagePriority en fr de
+</IfModule>

 #
 # AddType allows you to tweak mime.types without actually editing  
it, or to
@@ -692,6 +715,9 @@
 #
 #AddHandler type-map var

+</IfModule>
+# End of document types.
+
 #
 # Action lets you define media types that will execute a script whenever
 # a matching file is called. This eliminates the need for repeated URL
@@ -733,6 +759,11 @@
 #  request will *not* be available to such a script.

 #
+# Customize behaviour based on the browser
+#
+<IfModule mod_setenvif.c>
+
+#
 # The following directives modify normal HTTP response behavior.
 # The first directive disables keepalive for Netscape 2.x and  
browsers that
 # spoof it. There are known problems with these browser implementations.
@@ -751,6 +782,8 @@
 BrowserMatch "RealPlayer 4\.0" force-response-1.0
 BrowserMatch "Java/1\.0" force-response-1.0
 BrowserMatch "JDK/1\.0" force-response-1.0
+
+</IfModule>

 #
 # Allow server status reports, with the URL of  
http://servername/server-status


--
       Wilfredo Sanchez, wsanchez@apple.com
Apple Computer, Inc., Core Operating Systems / BSD
          Technical Lead, Darwin Project
   1 Infinite Loop, 302-4K, Cupertino, CA 95014


Mime
View raw message