EVOLUTION-MANAGER
Edit File: version-4.3.0.html
<!DOCTYPE html> <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Version 4.3.0 — mod_wsgi 4.7.1 documentation</title> <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> <link rel="top" title="mod_wsgi 4.7.1 documentation" href="../index.html"/> <link rel="up" title="Release Notes" href="../release-notes.html"/> <link rel="next" title="Version 4.2.8" href="version-4.2.8.html"/> <link rel="prev" title="Version 4.3.1" href="version-4.3.1.html"/> <script src="../_static/js/modernizr.min.js"></script> </head> <body class="wy-body-for-nav" role="document"> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search"> <a href="../index.html" class="icon icon-home"> mod_wsgi </a> <div class="version"> 4.7 </div> <div role="search"> <form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> <input type="text" name="q" placeholder="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="../project-status.html">Project Status</a></li> <li class="toctree-l1"><a class="reference internal" href="../security-issues.html">Security Issues</a></li> <li class="toctree-l1"><a class="reference internal" href="../getting-started.html">Getting Started</a></li> <li class="toctree-l1"><a class="reference internal" href="../requirements.html">Requirements</a></li> <li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li> <li class="toctree-l1"><a class="reference internal" href="../troubleshooting.html">Troubleshooting</a></li> <li class="toctree-l1"><a class="reference internal" href="../user-guides.html">User Guides</a></li> <li class="toctree-l1"><a class="reference internal" href="../configuration.html">Configuration</a></li> <li class="toctree-l1"><a class="reference internal" href="../finding-help.html">Finding Help</a></li> <li class="toctree-l1"><a class="reference internal" href="../reporting-bugs.html">Reporting Bugs</a></li> <li class="toctree-l1"><a class="reference internal" href="../contributing.html">Contributing</a></li> <li class="toctree-l1"><a class="reference internal" href="../source-code.html">Source Code</a></li> <li class="toctree-l1 current"><a class="reference internal" href="../release-notes.html">Release Notes</a><ul class="current"> <li class="toctree-l2"><a class="reference internal" href="version-4.7.0.html">Version 4.7.0</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.7.1.html">Version 4.7.1</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.6.8.html">Version 4.6.8</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.6.7.html">Version 4.6.7</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.6.6.html">Version 4.6.6</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.6.5.html">Version 4.6.5</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.6.4.html">Version 4.6.4</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.6.3.html">Version 4.6.3</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.6.2.html">Version 4.6.2</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.6.1.html">Version 4.6.1</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.6.0.html">Version 4.6.0</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.24.html">Version 4.5.24</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.23.html">Version 4.5.23</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.22.html">Version 4.5.22</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.21.html">Version 4.5.21</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.20.html">Version 4.5.20</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.19.html">Version 4.5.19</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.18.html">Version 4.5.18</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.17.html">Version 4.5.17</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.16.html">Version 4.5.16</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.15.html">Version 4.5.15</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.14.html">Version 4.5.14</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.13.html">Version 4.5.13</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.12.html">Version 4.5.12</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.11.html">Version 4.5.11</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.10.html">Version 4.5.10</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.9.html">Version 4.5.9</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.8.html">Version 4.5.8</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.7.html">Version 4.5.7</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.6.html">Version 4.5.6</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.5.html">Version 4.5.5</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.4.html">Version 4.5.4</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.3.html">Version 4.5.3</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.2.html">Version 4.5.2</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.1.html">Version 4.5.1</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.5.0.html">Version 4.5.0</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.23.html">Version 4.4.23</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.22.html">Version 4.4.22</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.21.html">Version 4.4.21</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.20.html">Version 4.4.20</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.19.html">Version 4.4.19</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.18.html">Version 4.4.18</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.17.html">Version 4.4.17</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.16.html">Version 4.4.16</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.15.html">Version 4.4.15</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.14.html">Version 4.4.14</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.13.html">Version 4.4.13</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.12.html">Version 4.4.12</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.11.html">Version 4.4.11</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.10.html">Version 4.4.10</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.9.html">Version 4.4.9</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.8.html">Version 4.4.8</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.7.html">Version 4.4.7</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.6.html">Version 4.4.6</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.5.html">Version 4.4.5</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.4.html">Version 4.4.4</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.3.html">Version 4.4.3</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.2.html">Version 4.4.2</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.1.html">Version 4.4.1</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.4.0.html">Version 4.4.0</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.3.2.html">Version 4.3.2</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.3.1.html">Version 4.3.1</a></li> <li class="toctree-l2 current"><a class="current reference internal" href="">Version 4.3.0</a><ul> <li class="toctree-l3"><a class="reference internal" href="#known-issues">Known Issues</a></li> <li class="toctree-l3"><a class="reference internal" href="#bugs-fixed">Bugs Fixed</a></li> <li class="toctree-l3"><a class="reference internal" href="#features-changed">Features Changed</a></li> <li class="toctree-l3"><a class="reference internal" href="#new-features">New Features</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="version-4.2.8.html">Version 4.2.8</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.2.7.html">Version 4.2.7</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.2.6.html">Version 4.2.6</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.2.5.html">Version 4.2.5</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.2.4.html">Version 4.2.4</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.2.3.html">Version 4.2.3</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.2.2.html">Version 4.2.2</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.2.1.html">Version 4.2.1</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.2.0.html">Version 4.2.0</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.1.3.html">Version 4.1.3</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.1.2.html">Version 4.1.2</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.1.1.html">Version 4.1.1</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.1.0.html">Version 4.1.0</a></li> <li class="toctree-l2"><a class="reference internal" href="version-4.0.html">Version 4.0</a></li> <li class="toctree-l2"><a class="reference internal" href="version-3.5.html">Version 3.5</a></li> <li class="toctree-l2"><a class="reference internal" href="version-3.4.html">Version 3.4</a></li> <li class="toctree-l2"><a class="reference internal" href="version-3.3.html">Version 3.3</a></li> <li class="toctree-l2"><a class="reference internal" href="version-3.2.html">Version 3.2</a></li> <li class="toctree-l2"><a class="reference internal" href="version-3.1.html">Version 3.1</a></li> <li class="toctree-l2"><a class="reference internal" href="version-3.0.html">Version 3.0</a></li> <li class="toctree-l2"><a class="reference internal" href="version-2.8.html">Version 2.8</a></li> <li class="toctree-l2"><a class="reference internal" href="version-2.7.html">Version 2.7</a></li> <li class="toctree-l2"><a class="reference internal" href="version-2.6.html">Version 2.6</a></li> <li class="toctree-l2"><a class="reference internal" href="version-2.5.html">Version 2.5</a></li> <li class="toctree-l2"><a class="reference internal" href="version-2.4.html">Version 2.4</a></li> <li class="toctree-l2"><a class="reference internal" href="version-2.3.html">Version 2.3</a></li> <li class="toctree-l2"><a class="reference internal" href="version-2.2.html">Version 2.2</a></li> <li class="toctree-l2"><a class="reference internal" href="version-2.1.html">Version 2.1</a></li> <li class="toctree-l2"><a class="reference internal" href="version-2.0.html">Version 2.0</a></li> <li class="toctree-l2"><a class="reference internal" href="version-1.6.html">Version 1.6</a></li> <li class="toctree-l2"><a class="reference internal" href="version-1.5.html">Version 1.5</a></li> <li class="toctree-l2"><a class="reference internal" href="version-1.4.html">Version 1.4</a></li> <li class="toctree-l2"><a class="reference internal" href="version-1.3.html">Version 1.3</a></li> <li class="toctree-l2"><a class="reference internal" href="version-1.2.html">Version 1.2</a></li> <li class="toctree-l2"><a class="reference internal" href="version-1.1.html">Version 1.1</a></li> <li class="toctree-l2"><a class="reference internal" href="version-1.0.html">Version 1.0</a></li> </ul> </li> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> <nav class="wy-nav-top" role="navigation" aria-label="top navigation"> <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="../index.html">mod_wsgi</a> </nav> <div class="wy-nav-content"> <div class="rst-content"> <div role="navigation" aria-label="breadcrumbs navigation"> <ul class="wy-breadcrumbs"> <li><a href="../index.html">Docs</a> »</li> <li><a href="../release-notes.html">Release Notes</a> »</li> <li>Version 4.3.0</li> <li class="wy-breadcrumbs-aside"> <a href="../_sources/release-notes/version-4.3.0.txt" rel="nofollow"> View page source</a> </li> </ul> <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <div class="section" id="version-4-3-0"> <h1>Version 4.3.0<a class="headerlink" href="#version-4-3-0" title="Permalink to this headline">¶</a></h1> <p>Version 4.3.0 of mod_wsgi can be obtained from:</p> <blockquote> <div><a class="reference external" href="https://github.com/GrahamDumpleton/mod_wsgi/archive/4.3.0.tar.gz">https://github.com/GrahamDumpleton/mod_wsgi/archive/4.3.0.tar.gz</a></div></blockquote> <div class="section" id="known-issues"> <h2>Known Issues<a class="headerlink" href="#known-issues" title="Permalink to this headline">¶</a></h2> <p>1. The makefiles for building mod_wsgi on Windows are currently broken and need updating. As most new changes relate to mod_wsgi daemon mode, which is not supported under Windows, you should keep using the last available binary for version 3.X on Windows instead.</p> </div> <div class="section" id="bugs-fixed"> <h2>Bugs Fixed<a class="headerlink" href="#bugs-fixed" title="Permalink to this headline">¶</a></h2> <p>1. Performing authorization using the <tt class="docutils literal"><span class="pre">WSGIAuthGroupScript</span></tt> was not working correctly on Apache 2.4 due to changes in how auth providers and authentication/authorization works. The result could be that a user could gain access to a resource even though they were not in the required group.</p> <p>2. Under Apache 2.4, when creating the <tt class="docutils literal"><span class="pre">environ</span></tt> dictionary for passing into access/authentication/authorisation handlers, the behvaiour of Apache 2.4 as it pertained to the WSGI application, whereby it blocked the passing of any HTTP headers with a name which did not contain just alphanumerics or ‘-‘, was not being mirrored. This created the possibility of HTTP header spoofing in certain circumstances. Such headers are now being ignored.</p> <p>3. When <tt class="docutils literal"><span class="pre">home</span></tt> option was used with <tt class="docutils literal"><span class="pre">WSGIDaemonProcess</span></tt> directive an empty string was added to <tt class="docutils literal"><span class="pre">sys.path</span></tt>. This meant current working directory would be searched. This was fine so long as the current working directory wasn’t changed, but if it was, it would no longer look in the home directory. Need to use the actual home directory instead.</p> <p>4. Fixed Django management command integration so would work for versions of Django prior to 1.6 where <tt class="docutils literal"><span class="pre">BASE_DIR</span></tt> didn’t exist in Django settings module.</p> </div> <div class="section" id="features-changed"> <h2>Features Changed<a class="headerlink" href="#features-changed" title="Permalink to this headline">¶</a></h2> <p>1. In Apache 2.4, any headers with a name which does not include only alphanumerics or ‘-‘ are blocked from being passed into a WSGI application when the CGI like WSGI <tt class="docutils literal"><span class="pre">environ</span></tt> dictionary is created. This is a mechanism to prevent header spoofing when there are multiple headers where the only difference is the use of non alphanumerics in a specific character position.</p> <p>This protection mechanism from Apache 2.4 is now being restrospectively applied even when Apache 2.2 is being used and even though Apache itself doesn’t do it. This may technically result in headers that were previously being passed, no longer being passed. The change is also technically against what the HTTP RFC says is allowed for HTTP header names, but such blocking would occur in Apache 2.4 anyway due to changes in Apache. It is also understood that other web servers such as nginx also perform the same type of blocking. Reliance on HTTP headers which use characters other than alphanumerics and ‘-‘ is therefore dubious as many servers will now discard them when needing to be passed into a system which requires the headers to be passed as CGI like variables such as is the case for WSGI.</p> <p>2. In Apache 2.4, only <tt class="docutils literal"><span class="pre">wsgi-group</span></tt> is allowed when using the <tt class="docutils literal"><span class="pre">Require</span></tt> directive for group authorisation. In prior Apache versions <tt class="docutils literal"><span class="pre">group</span></tt> would also be accepted and matched by the <tt class="docutils literal"><span class="pre">wsgi</span></tt> auth provider. The inability to use <tt class="docutils literal"><span class="pre">group</span></tt> is due to a change in Apache itself and not mod_wsgi. To avoid any issues going forward though, the mod_wsgi code will now no longer check for <tt class="docutils literal"><span class="pre">group</span></tt> even if for some reason Apache still decides to pass the authorisation check off to mod_wsgi even when it shouldn’t.</p> </div> <div class="section" id="new-features"> <h2>New Features<a class="headerlink" href="#new-features" title="Permalink to this headline">¶</a></h2> <p>1. The value of the <tt class="docutils literal"><span class="pre">REMOTE_USER</span></tt> variable for an authenticated user when user <tt class="docutils literal"><span class="pre">Basic</span></tt> authentication can now be overridden from an authentication handler specified using the <tt class="docutils literal"><span class="pre">WSGIAuthUserScript</span></tt>. To override the name used to identify the user, instead of returning <tt class="docutils literal"><span class="pre">True</span></tt> when indicating that the user is allowed, return the name to be used for that user as a string. That value will then be passed through in <tt class="docutils literal"><span class="pre">REMOTE_USER</span></tt> in place of any original value:</p> <div class="highlight-python"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">check_password</span><span class="p">(</span><span class="n">environ</span><span class="p">,</span> <span class="n">user</span><span class="p">,</span> <span class="n">password</span><span class="p">):</span> <span class="k">if</span> <span class="n">user</span> <span class="o">==</span> <span class="s1">'spy'</span><span class="p">:</span> <span class="k">if</span> <span class="n">password</span> <span class="o">==</span> <span class="s1">'secret'</span><span class="p">:</span> <span class="k">return</span> <span class="s1">'grumpy'</span> <span class="k">return</span> <span class="bp">False</span> <span class="k">return</span> <span class="bp">None</span> </pre></div> </div> <p>2. Added the <tt class="docutils literal"><span class="pre">--debug-mode</span></tt> option to <tt class="docutils literal"><span class="pre">mod_wsgi-express</span></tt> which results in Apache and the WSGI application being run in a single process which is left attached to stdin/stdout of the shell where the script was run. Only a single thread will be used to handle any requests.</p> <p>This feature enables the ability to interactively debug a Python WSGI application using the Python debugger (<tt class="docutils literal"><span class="pre">pdb</span></tt>). The simplest way to break into the Python debugger is by adding to your WSGI application code:</p> <div class="highlight-python"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pdb</span><span class="p">;</span> <span class="n">pdb</span><span class="o">.</span><span class="n">set_trace</span><span class="p">()</span> </pre></div> </div> <p>3. Added the <tt class="docutils literal"><span class="pre">--application-type</span></tt> option to <tt class="docutils literal"><span class="pre">mod_wsgi-express</span></tt>. This defaults to <tt class="docutils literal"><span class="pre">script</span></tt> indicating that the target WSGI application provided to <tt class="docutils literal"><span class="pre">mod_wsgi-express</span></tt> is a WSGI script file defined by a relative or absolute file system path.</p> <p>In addition to <tt class="docutils literal"><span class="pre">script</span></tt>, it is also possible to supply for the application type <tt class="docutils literal"><span class="pre">module</span></tt> and <tt class="docutils literal"><span class="pre">paste</span></tt>.</p> <p>For the case of <tt class="docutils literal"><span class="pre">module</span></tt>, the target WSGI application will be taken to reside in a Python module with the specified name. This module will be loaded using the standard Python module import system and so must reside on the Python module search path.</p> <p>For the case of <tt class="docutils literal"><span class="pre">paste</span></tt>, the target WSGI application will be taken to be a Paste deployment configuration file. In loading the Paste deployment configuration file, any WSGI application pipeline specified by the configuration will be constructed and the resulting top level WSGI application entry point returned used as the WSGI application.</p> <p>Note that the code file for the WSGI script file, Python module, or Paste deployment configuration file, if modified, will all result in the WSGI application being automatically reloaded on the next web request.</p> <p>4. Added the <tt class="docutils literal"><span class="pre">--auth-user-script</span></tt> and <tt class="docutils literal"><span class="pre">--auth-type</span></tt> options to <tt class="docutils literal"><span class="pre">mod_wsgi-express</span></tt> to enable the hosted site to implement user authentication using either HTTP <tt class="docutils literal"><span class="pre">Basic</span></tt> or <tt class="docutils literal"><span class="pre">Digest</span></tt> authentication mechanisms. The <tt class="docutils literal"><span class="pre">check_password()</span></tt> or <tt class="docutils literal"><span class="pre">get_realm_hash()</span></tt> functions should follow the same form as if using the <tt class="docutils literal"><span class="pre">WSGIAuthUserScript</span></tt> direct with mod_wsgi when using manual configuration.</p> <p>5. Added the <tt class="docutils literal"><span class="pre">--auth-group-script</span></tt> and <tt class="docutils literal"><span class="pre">--auth-group</span></tt> options to <tt class="docutils literal"><span class="pre">mod_wsgi-express</span></tt> to enable group authorization to be performed using a group authorization script, in conjunction with a user authentication script. The <tt class="docutils literal"><span class="pre">groups_for_user()</span></tt> function should follow the same form as if using the <tt class="docutils literal"><span class="pre">WSGIAuthGroupScript</span></tt> direct with mod_wsgi when using manual configuration.</p> <p>By default any users must be a member of the <tt class="docutils literal"><span class="pre">wsgi</span></tt> group. The name of this group though can be overridden using the <tt class="docutils literal"><span class="pre">--auth-group</span></tt> option. It is recommended that this be overridden rather than changing your own application to use the <tt class="docutils literal"><span class="pre">wsgi</span></tt> group.</p> <p>6. Added the <tt class="docutils literal"><span class="pre">--directory-index</span></tt> option to <tt class="docutils literal"><span class="pre">mod_wsgi-express</span></tt> to enable a index resource to be added to the document root directory which would take precedence over the WSGI application for the root page for the site.</p> <p>7. Added the <tt class="docutils literal"><span class="pre">--with-php5</span></tt> option to <tt class="docutils literal"><span class="pre">mod_wsgi-express</span></tt> to enable the concurrent hosting of a PHP web application in conjunction with the WSGI application. Due to the limitations of PHP, this is currently only supported if using prefork MPM.</p> <p>8. Added the <tt class="docutils literal"><span class="pre">--server-name</span></tt> option to <tt class="docutils literal"><span class="pre">mod_wsgi-express</span></tt>. When this is used and set to the host name for the web site, a virtual host will be created to ensure that the server only accepts web requests for that host name.</p> <p>If the host name starts with <tt class="docutils literal"><span class="pre">www.</span></tt> then web requests will also be accepted against the parent domain, that is the host name without the <tt class="docutils literal"><span class="pre">www.</span></tt>, but those requests will be automatically redirected to the specified host name on the same port as that used for the original request.</p> <p>When the <tt class="docutils literal"><span class="pre">--server-name</span></tt> option is being used, the <tt class="docutils literal"><span class="pre">--server-alias</span></tt> option can also be specified, multiple times if need be, to setup alternate names for the web site on which web requests should also be accepted. Wildcard aliases may be used in the name if wishing to match multiple sub domains in one go.</p> <p>If for some reason you do still need to be able to access the server via <tt class="docutils literal"><span class="pre">localhost</span></tt> when a virtual host for a set server name is being used, you can supply the <tt class="docutils literal"><span class="pre">--allow-localhost</span></tt> option.</p> <p>9. Added the <tt class="docutils literal"><span class="pre">--rotate-logs</span></tt> option to <tt class="docutils literal"><span class="pre">mod_wsgi-express</span></tt> to enable log file rotation. By default the error log and access log, if enabled, will be rotated when they reach 5MB in size. To change the size at which the log files will be rotated, use the <tt class="docutils literal"><span class="pre">--max-log-size</span></tt> option. If the <tt class="docutils literal"><span class="pre">rotatelogs</span></tt> command is not being found properly, its location can be specified using the <tt class="docutils literal"><span class="pre">--rotatelogs-executable</span></tt> option.</p> <p>10. Added the <tt class="docutils literal"><span class="pre">--ssl-port</span></tt> and <tt class="docutils literal"><span class="pre">--ssl-certificate</span></tt> options to <tt class="docutils literal"><span class="pre">mod_wsgi-express</span></tt>. When both are set, with the latter being the stub path for the SSL certificate <tt class="docutils literal"><span class="pre">.crt</span></tt> and <tt class="docutils literal"><span class="pre">.key</span></tt> file, then HTTPS requests will be handled over the designated SSL port.</p> <p>When <tt class="docutils literal"><span class="pre">--https-only</span></tt> is supplied, any requests made over HTTP to the non SSL port will be automatically redirected so as to use a HTTPS connection over the SSL connection.</p> <p>Note that if using the <tt class="docutils literal"><span class="pre">--allow-localhost</span></tt> option, redirection from a HTTP to HTTPS connection will not occur when access via <tt class="docutils literal"><span class="pre">localhost</span></tt>.</p> <p>11. Added the <tt class="docutils literal"><span class="pre">--setenv</span></tt> option to <tt class="docutils literal"><span class="pre">mod_wsgi-express</span></tt> to enable request specific name/value pairs to be added to the WSGI environ dictionary. The values are restricted to string values.</p> <p>Also added a companion <tt class="docutils literal"><span class="pre">--passenv</span></tt> option to <tt class="docutils literal"><span class="pre">mod_wsgi-express</span></tt> to indicate the names of normal process environment variables which should be added to the per request WSGI environ dictionary.</p> <p>12. Added the <tt class="docutils literal"><span class="pre">WSGIMapHEADToGET</span></tt> directive for overriding the previous behaviour of automatically mapping any <tt class="docutils literal"><span class="pre">HEAD</span></tt> request to a <tt class="docutils literal"><span class="pre">GET</span></tt> request when an Apache output filter was registered that may want to see the complete response in order to generate correct response headers.</p> <p>The directive can be set to be either <tt class="docutils literal"><span class="pre">Auto</span></tt> (the default), <tt class="docutils literal"><span class="pre">On</span></tt> which will always map a <tt class="docutils literal"><span class="pre">HEAD</span></tt> to <tt class="docutils literal"><span class="pre">GET</span></tt> even if no output filters detected and <tt class="docutils literal"><span class="pre">Off</span></tt> to always preserve the original request method type.</p> <p>The original behaviour was to avoid problems with users trying to optimise for <tt class="docutils literal"><span class="pre">HEAD</span></tt> requests and then breaking caching mechanisms because the response headers for a <tt class="docutils literal"><span class="pre">HEAD</span></tt> request for a resource didn’t match a <tt class="docutils literal"><span class="pre">GET</span></tt> request against the same resource as required by HTTP.</p> <p>If using mod_wsgi-express, the <tt class="docutils literal"><span class="pre">--map-head-to-get</span></tt> option can be used with the same values.</p> <p>12. Added the <tt class="docutils literal"><span class="pre">--compress-responses</span></tt> option to <tt class="docutils literal"><span class="pre">mod_wsgi-express</span></tt> to enable compression of common text based responses such as plain text, HTML, XML, CSS and Javascript.</p> </div> </div> </div> <div class="articleComments"> </div> </div> <footer> <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> <a href="version-4.2.8.html" class="btn btn-neutral float-right" title="Version 4.2.8" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> <a href="version-4.3.1.html" class="btn btn-neutral" title="Version 4.3.1" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> <hr/> <div role="contentinfo"> <p> © Copyright 2007-2020, Graham Dumpleton. </p> </div> Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. </footer> </div> </div> </section> </div> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', VERSION:'4.7.1', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true, SOURCELINK_SUFFIX: '' }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <script type="text/javascript" src="../_static/js/theme.js"></script> <script type="text/javascript"> jQuery(function () { SphinxRtdTheme.StickyNav.enable(); }); </script> </body> </html>