You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sl...@apache.org on 2001/12/05 19:28:37 UTC

cvs commit: httpd-2.0/docs/conf httpd-std.conf

slive       01/12/05 10:28:37

  Modified:    docs/conf httpd-std.conf
  Log:
  Config file updates.  Mostly just playing with comments, but a few functional
  changes:
  
  1. Remove the directives in the document root <directory> section that
  are there to handle the index.html.var and put them in their normal place
  in the config file.  I see no reason to duplicate the directives and
  explanations.
  
  2. Change from the funky FilesMatch/SetOutputFilter to AddOutputFilter for
  the SSI configuration.
  
  Revision  Changes    Path
  1.67      +45 -54    httpd-2.0/docs/conf/httpd-std.conf
  
  Index: httpd-std.conf
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/conf/httpd-std.conf,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -d -b -u -r1.66 -r1.67
  --- httpd-std.conf	2001/11/19 18:07:27	1.66
  +++ httpd-std.conf	2001/12/05 18:28:37	1.67
  @@ -236,16 +236,14 @@
   ServerAdmin you@your.address
   
   #
  -# ServerName allows you to set a host name which is sent back to clients for
  -# your server if it's different than the one the program would get (i.e., use
  -# "www" instead of the host's real name).
  +# ServerName gives the name and port that the server uses to identify itself.
  +# This can often be determined automatically, but we recommend you specify
  +# it explictly to prevent problems during startup.
   #
  -# Note: You cannot just invent host names and hope they work. The name you 
  -# define here must be a valid DNS name for your host. If you don't understand
  -# this, ask your network administrator.
  +# If this is not set to valid DNS name for your host, server-generated
  +# redirections will not work.  See also the UseCanonicalName directive.
  +#
   # If your host doesn't have a registered DNS name, enter its IP address here.
  -# You will have to access it by its address (e.g., http://123.45.67.89/)
  -# anyway, and this will make redirections work in a sensible way.
   #
   #ServerName new.host.name:80
   
  @@ -257,7 +255,7 @@
   DocumentRoot "@@ServerRoot@@/htdocs"
   
   #
  -# Each directory to which Apache has access, can be configured with respect
  +# Each directory to which Apache has access can be configured with respect
   # to which services and features are allowed and/or disabled in that
   # directory (and its subdirectories). 
   #
  @@ -282,18 +280,23 @@
   <Directory "@@ServerRoot@@/htdocs">
   
   #
  -# This may also be "None", "All", or any combination of "Indexes",
  -# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
  +# Possible values for the Options directive are "None", "All",
  +# or any combination of:
  +#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI Multiviews
   #
   # Note that "MultiViews" must be named *explicitly* --- "Options All"
   # doesn't give it to you.
   #
  +# The Options directive is both complicated and important.  Please see
  +# http://httpd.apache.org/docs-2.0/mod/core.html#options
  +# for more information.
  +#
       Options Indexes FollowSymLinks
   
   #
  -# This controls which options the .htaccess files in directories can
  -# override. Can also be "All", or any combination of "Options", "FileInfo", 
  -# "AuthConfig", and "Limit"
  +# AllowOverride controls what directives may be placed in .htaccess files.
  +# It can be "All", "None", or any combination of:
  +#   Options FileInfo AuthConfig Limit
   #
       AllowOverride None
   
  @@ -303,19 +306,10 @@
       Order allow,deny
       Allow from all
   
  -#
  -# Note that directly accessing an index.html.var typemap is much faster
  -# than using MultiViews negotation on a directory.  We distribute a typemap
  -# of the complete index.html collection, so we use that index.html.var
  -# typemap here.  If Options is set to Multiviews, this optimization is lost.
  -#
  -    AddHandler type-map var
  -    DirectoryIndex index.html index.html.var
  -
   </Directory>
   
   #
  -# UserDir: The name of the directory which is appended onto a user's home
  +# UserDir: The name of the directory that is appended onto a user's home
   # directory if a ~user request is received.
   #
   UserDir public_html
  @@ -338,14 +332,18 @@
   #</Directory>
   
   #
  -# DirectoryIndex: Name of the file or files to use as a pre-written HTML
  -# directory index.  Separate multiple entries with spaces.
  +# DirectoryIndex: sets the file that Apache will serve if a directory
  +# is requested.
   #
  -DirectoryIndex index.html
  +# The index.html.var file (a type-map) is used to deliver content-
  +# negotiated documents.  The MultiViews Option can be used for the 
  +# same purpose, but it is much slower.
  +#
  +DirectoryIndex index.html index.html.var
   
   #
   # AccessFileName: The name of the file to look for in each directory
  -# for access control information.
  +# for access control information.  See also the AllowOverride directive.
   #
   AccessFileName .htaccess
   
  @@ -748,52 +746,45 @@
   AddCharset EUC-KR      .euc-kr
   AddCharset shift_jis   .sjis
   
  -#
  -# AddType allows you to tweak mime.types without actually editing it, or to
  -# make certain files to be certain types.
  -#
  -# For example, the PHP3 module (not part of the Apache distribution - see
  -# http://www.php.net) will typically use:
   #
  -#AddType application/x-httpd-php3 .php3
  -#AddType application/x-httpd-php3-source .phps
  +# AddType allows you to add to or override the MIME configuration
  +# file mime.types for specific file types.
   
   AddType application/x-tar .tgz
   
   #
  -# AddHandler allows you to map certain file extensions to "handlers",
  +# AddHandler allows you to map certain file extensions to "handlers":
   # actions unrelated to filetype. These can be either built into the server
  -# or added with the Action command (see below)
  -#
  -# If you want to use server side includes, or CGI outside
  -# ScriptAliased directories, uncomment the following lines.
  +# or added with the Action directive (see below)
   #
  -# To use CGI scripts:
  +# To use CGI scripts outside of ScriptAliased directories:
  +# (You will also need to add "ExecCGI" to the "Options" directive.)
   #
   #AddHandler cgi-script .cgi
   
   #
  -# To use server-parsed HTML files
  +# For files that include their own HTTP headers:
   #
  -#<FilesMatch "\.shtml(\..+)?$">
  -#    SetOutputFilter INCLUDES
  -#</FilesMatch>
  +#AddHandler send-as-is asis
   
   #
  -# Uncomment the following line to enable Apache's send-asis HTTP file
  -# feature
  +# For server-parsed imagemap files:
   #
  -#AddHandler send-as-is asis
  +#AddHandler imap-file map
   
   #
  -# If you wish to use server-parsed imagemap files, use
  +# For type maps (negotiated resources):
  +# (This is enabled by default to allow the Apache "It Worked" page
  +#  to be distributed in multiple languages.)
   #
  -#AddHandler imap-file map
  +AddHandler type-map var
   
  +# Filters allow you to process content before it is sent to the client.
   #
  -# To enable type maps, you might want to use
  +# To parse .shtml files for server-side includes (SSI):
  +# (You will also need to add "Includes" to the "Options" directive.)
   #
  -#AddHandler type-map var
  +#AddOutputFilter INCLUDES .shtml
   
   #
   # Action lets you define media types that will execute a script whenever
  
  
  

Re: cvs commit: httpd-2.0/docs/conf httpd-std.conf

Posted by "Roy T. Fielding" <fi...@ebuilt.com>.
> But this fundamentally conflicts with having a language negotiated page
> appear when the user fires up a browser and points it at http://localhost/.
> To enable things for that page, we must enable them for the document root,
> which makes them enabled for most content.  The only change that I made was
> to explicitly enable them for all content.  It seems to me the choices are
> 
> 1. Ditch the "it worked" page.  It may have caused more trouble over the
> years than it is worth.

+1 billion!!!!!

> 2. Make the simplest possible configuration that allows the "it worked" page
> to work.  I think this is what we currently have.  Having type-maps enabled
> by default is not optimal, but shouldn't be very dangerous.  Having
> index.html.var in the DirectoryIndex is also not optimal, but as long as it
> is listed last it will not cause problems in most cases.  (Costing an extra
> stat when serving the "it worked" page is much better than costing an extra
> stat when serving every other index.html.)

I would much prefer eliminating the It Worked page (and all its variants),
replace it with a simple message of "This web server is up and running,
but the content is under construction."  [with NO mention of it being Apache]
And then move the 50 or so language-negotiated intro pages to the content
within the separately access-controlled /manual location.

The default installation of Apache should maximize the performance of
simple flat files under docroot.

....Roy


RE: cvs commit: httpd-2.0/docs/conf httpd-std.conf

Posted by Joshua Slive <jo...@slive.ca>.

> From: William A. Rowe, Jr. [mailto:wrowe@covalent.net]

> > >   1. Remove the directives in the document root <directory> section
that
> > >   are there to handle the index.html.var and put them in their normal
place
> > >   in the config file.  I see no reason to duplicate the directives and
> > >   explanations.
> >

> Simplicity.  Start _very_ simple and let them add their desired goodies
> to the default context.

Absolutely.

But this fundamentally conflicts with having a language negotiated page
appear when the user fires up a browser and points it at http://localhost/.
To enable things for that page, we must enable them for the document root,
which makes them enabled for most content.  The only change that I made was
to explicitly enable them for all content.  It seems to me the choices are

1. Ditch the "it worked" page.  It may have caused more trouble over the
years than it is worth.

2. Make the simplest possible configuration that allows the "it worked" page
to work.  I think this is what we currently have.  Having type-maps enabled
by default is not optimal, but shouldn't be very dangerous.  Having
index.html.var in the DirectoryIndex is also not optimal, but as long as it
is listed last it will not cause problems in most cases.  (Costing an extra
stat when serving the "it worked" page is much better than costing an extra
stat when serving every other index.html.)

Joshua.


Re: cvs commit: httpd-2.0/docs/conf httpd-std.conf

Posted by "William A. Rowe, Jr." <wr...@covalent.net>.
From: <jo...@slive.ca>
Sent: Thursday, December 06, 2001 7:51 AM


> > >   1. Remove the directives in the document root <directory> section that
> > >   are there to handle the index.html.var and put them in their normal place
> > >   in the config file.  I see no reason to duplicate the directives and
> > >   explanations.
> >
> I don't think I've changed anything functionally.  Whether these
> directives are applied to the document root or the server context makes no
> difference.  They will get used for the majority of user content either
> way.

Should they?  Does the average user actually use index.html.var?  If not, that's
a lot of stats to waste when they don't have index.html, and no interest in using
var content.  We could turn on index.shtml and others, but we don't, because we
don't expect the typical user to need them.  We could add index.htm for our MS
products users, and many others.  We keep it simple, on purpose, with an example
[comment] of what they _could_ do here.  index.html.var could be on that list.

> As far as the order of .html and .html.var, I did not change that.
> However, I think it is fine the way it is, since MultiViews is turned off
> in the document root.

You did not change that.  And it should be transposed in the htdocs <Directory
but I need to have negotation fixed, and go back over why this was switched.

> So, I'm really not sure why you say this is wrong.  Perhaps you could
> explain.

Simplicity.  Start _very_ simple and let them add their desired goodies 
to the default context.

Bill


Re: cvs commit: httpd-2.0/docs/conf httpd-std.conf

Posted by jo...@slive.ca.
On Wed, 5 Dec 2001, William A. Rowe, Jr. wrote:
> >   1. Remove the directives in the document root <directory> section that
> >   are there to handle the index.html.var and put them in their normal place
> >   in the config file.  I see no reason to duplicate the directives and
> >   explanations.
>
> Josh, your change is altogether wrong, since the typical user doesn't create
> .var files to serve.  In fact it is further wrong since index.html.var should
> be attempted before index.html [which in multiviews, will trigger index.html.var
> after first wasting a dozen stats.]  So it was wrong - remains wrong, only
> differently so.  I seem to remember we switched index.html with index.html.var
> for some obscure reason - possibly related to the state of negotation.  With my
> boss telling me I'm finally pat on the 'extra' work-work assignments piled on my
> desk, I can FINALLY go back to the httpd tree and get negotation wrapped up :-!
> So leave this till negotation works this weekend.

I don't think I've changed anything functionally.  Whether these
directives are applied to the document root or the server context makes no
difference.  They will get used for the majority of user content either
way.

As far as the order of .html and .html.var, I did not change that.
However, I think it is fine the way it is, since MultiViews is turned off
in the document root.

So, I'm really not sure why you say this is wrong.  Perhaps you could
explain.

Joshua.


Re: cvs commit: httpd-2.0/docs/conf httpd-std.conf

Posted by "William A. Rowe, Jr." <wr...@covalent.net>.
From: <sl...@apache.org>
Sent: Wednesday, December 05, 2001 12:28 PM


> slive       01/12/05 10:28:37
> 
>   Modified:    docs/conf httpd-std.conf
>   Log:
>   Config file updates.  Mostly just playing with comments, but a few functional
>   changes:
>   
>   1. Remove the directives in the document root <directory> section that
>   are there to handle the index.html.var and put them in their normal place
>   in the config file.  I see no reason to duplicate the directives and
>   explanations.

Josh, your change is altogether wrong, since the typical user doesn't create
.var files to serve.  In fact it is further wrong since index.html.var should
be attempted before index.html [which in multiviews, will trigger index.html.var
after first wasting a dozen stats.]  So it was wrong - remains wrong, only
differently so.  I seem to remember we switched index.html with index.html.var
for some obscure reason - possibly related to the state of negotation.  With my
boss telling me I'm finally pat on the 'extra' work-work assignments piled on my 
desk, I can FINALLY go back to the httpd tree and get negotation wrapped up :-!
So leave this till negotation works this weekend.

>   2. Change from the funky FilesMatch/SetOutputFilter to AddOutputFilter for
>   the SSI configuration.

Agreed, this had a few users confused [with both sections in their config.]
Right call.

Bill