httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject cvs commit: httpd-2.0/docs/manual/mod mod_version.xml
Date Mon, 12 Apr 2004 15:50:43 GMT
nd          2004/04/12 08:50:43

  Added:       docs/manual/mod mod_version.xml
  describe mod_version, please review.
  Revision  Changes    Path
  1.1                  httpd-2.0/docs/manual/mod/mod_version.xml
  Index: mod_version.xml
  <?xml version="1.0"?>
  <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
  <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
   Copyright 2004 The Apache Software Foundation
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   See the License for the specific language governing permissions and
   limitations under the License.
  <modulesynopsis metafile="mod_version.xml.meta">
  <description>Version dependent configuration</description>
  <compatibility>Available in version 2.1 and later</compatibility>
      <p>This module is designed for the use in test suites and large
      networks which have to deal with different httpd versions and
      different configurations. It provides a new container -- <directive
      type="section" module="mod_version">IfVersion</directive>, which
      allows a flexible version checking including numeric comparisons and
      regular expressions.</p>
        &lt;IfVersion 2.1.0&gt;<br />
          # current httpd version is exactly 2.1.0<br />
        &lt;/IfVersion&gt;<br />
        <br />
        &lt;IfVersion >= 2.2&gt;<br />
          # use really new features :-)<br />
      <p>See below for further possibilities.</p>
  <directivesynopsis type="section">
  <description>contains version dependent configuration</description>
  <syntax>&lt;IfVersion [[!]<var>operator</var>] <var>version</var>&gt;
  <contextlist><context>server config</context><context>virtual host</context>
      <p>The <directive type="section">IfVersion</directive> section encloses
      configuration directives which are executed only if the httpd version
      matches the desired criteria. For normal (numeric) comparisons the
      <var>version</var> argument has the format
      <code>2.1.0</code> or <code>2.2</code>. <var>minor</var>
      <var>patch</var> are optional. If these numbers are omitted, they are
      assumed to be zero. The following numerical <var>operator</var>s are
      <tr><td><code>=</code> or <code>==</code></td>
          <td>httpd version is equal</td></tr>
          <td>httpd version is greater than</td></tr>
          <td>httpd version is greater or equal</td></tr>
          <td>httpd version is less than</td></tr>
          <td>httpd version is less or equal</td></tr>
        &lt;IfVersion >= 2.1&gt;<br />
          # this happens only in versions greater or<br />
          # equal 2.1.0.<br />
      <p>Besides the numerical comparison it is possible to match a regular
      expression against the httpd version. There are two ways to write it:</p>
      <tr><td><code>=</code> or <code>==</code></td>
          <td><var>version</var> has the form
          <td><var>version</var> has the form
        &lt;IfVersion = /^2.1.[01234]$/&gt;<br />
          # e.g. workaround for buggy versions
      <p>In order to reverse the meaning, all operators can be preceded by an
      exclamation mark (<code>!</code>):</p>
        &lt;IfVersion !~ ^2.1.[01234]$&gt;<br />
          # not for those versions<br />
      <p>If the operator is omitted, it is assumed to be <code>=</code>.</p>

View raw message