Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 4e237fd705495e1e21ef20696443e053 > files > 973

bugzilla-5.0.4-3.mga7.noarch.rpm


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>3.5.2. Apache on Windows &#8212; Bugzilla 5.0.4 documentation</title>
    <link rel="stylesheet" href="../_static/bugzilla.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '5.0.4',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true,
        SOURCELINK_SUFFIX: '.txt'
      };
    </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>
    <link rel="shortcut icon" href="../_static/favicon.ico"/>
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="3.5.3. Microsoft IIS" href="iis.html" />
    <link rel="prev" title="3.5.1. Apache" href="apache.html" /> 
  </head>
  <body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="iis.html" title="3.5.3. Microsoft IIS"
             accesskey="N">next</a></li>
        <li class="right" >
          <a href="apache.html" title="3.5.1. Apache"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">Bugzilla 5.0.4 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" >3. Installation and Maintenance Guide</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="web_server.html" accesskey="U">3.5. Web Server</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="apache-on-windows">
<span id="apache-windows"></span><h1>3.5.2. Apache on Windows<a class="headerlink" href="#apache-on-windows" title="Permalink to this headline">¶</a></h1>
<p>Bugzilla supports all versions of Apache 2.2.x and 2.4.x.</p>
<div class="section" id="installing">
<h2>3.5.2.1. Installing<a class="headerlink" href="#installing" title="Permalink to this headline">¶</a></h2>
<p>Download the Apache HTTP Server as a <code class="file docutils literal"><span class="pre">.zip</span></code> archive either from the
<a class="reference external" href="http://www.apachelounge.com/download">Apache Lounge website</a> or from the
<a class="reference external" href="http://www.apachehaus.com/cgi-bin/download.plx">Apache Haus website</a>.</p>
<p>Unzip the archive into <code class="file docutils literal"><span class="pre">C:\Apache24</span></code>. If you move it elsewhere, then
you must edit several variables in <code class="file docutils literal"><span class="pre">httpd.conf</span></code>, including <code class="docutils literal"><span class="pre">ServerRoot</span></code>
and <code class="docutils literal"><span class="pre">DocumentRoot</span></code>.</p>
<p>You must now edit the Apache configuration file <code class="file docutils literal"><span class="pre">C:\Apache24\conf\httpd.conf</span></code>
and do the following steps:</p>
<ol class="arabic simple">
<li>Uncomment <code class="docutils literal"><span class="pre">LoadModule</span> <span class="pre">cgi_module</span> <span class="pre">modules/mod_cgi.so</span></code> at the beginning of the
file to enable CGI support.</li>
<li>Uncomment <code class="docutils literal"><span class="pre">AddHandler</span> <span class="pre">cgi-script</span> <span class="pre">.cgi</span></code> to register <code class="file docutils literal"><span class="pre">.cgi</span></code> files
as CGI scripts. For this handler to work, you must create a key in the
Windows registry named <code class="docutils literal"><span class="pre">HKEY_CLASSES_ROOT\.cgi\Shell\ExecCGI\Command</span></code> with
the default value pointing to the full path of <code class="file docutils literal"><span class="pre">perl.exe</span></code> with a <code class="docutils literal"><span class="pre">-T</span></code>
parameter. For example <code class="file docutils literal"><span class="pre">C:\Perl\bin\perl.exe</span> <span class="pre">-T</span></code> if you use ActivePerl,
or <code class="file docutils literal"><span class="pre">C:\Strawberry\perl\bin\perl.exe</span> <span class="pre">-T</span></code> if you use Strawberry Perl.</li>
<li>Add an Alias and a Directory for Bugzilla:</li>
</ol>
<div class="highlight-apache"><div class="highlight"><pre><span></span><span class="nb">Alias</span> <span class="s2">&quot;/bugzilla/&quot;</span> <span class="s2">&quot;C:/bugzilla/&quot;</span>
<span class="nt">&lt;Directory</span> <span class="s">&quot;C:/bugzilla&quot;</span><span class="nt">&gt;</span>
    <span class="nb">ScriptInterpreterSource</span> <span class="k">Registry</span>-Strict
    <span class="nb">Options</span> +ExecCGI +FollowSymLinks
    <span class="nb">DirectoryIndex</span> index.cgi index.html
    <span class="nb">AllowOverride</span> <span class="k">All</span>
    <span class="nb">Require</span> <span class="k">all</span> granted
<span class="nt">&lt;/Directory&gt;</span>
</pre></div>
</div>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">The above block takes a simple approach to access control and is
correct for Apache 2.4. For Apache 2.2, replace <code class="docutils literal"><span class="pre">Require</span> <span class="pre">all</span> <span class="pre">granted</span></code>
with <code class="docutils literal"><span class="pre">Allow</span> <span class="pre">from</span> <span class="pre">all</span></code>. If you have other access control
requirements, you may need to make further modifications.</p>
</div>
<p>You now save your changes and start Apache as a service. From the Windows
command line (<code class="file docutils literal"><span class="pre">cmd.exe</span></code>):</p>
<p><strong class="command">C:\Apache24\bin&gt;httpd.exe -k install</strong></p>
<p>That's it! Bugzilla is now accessible from <a class="reference external" href="http://localhost/bugzilla">http://localhost/bugzilla</a>.</p>
</div>
<div class="section" id="apache-account-permissions">
<h2>3.5.2.2. Apache Account Permissions<a class="headerlink" href="#apache-account-permissions" title="Permalink to this headline">¶</a></h2>
<p>By default Apache installs itself to run as the SYSTEM account. For security
reasons it's better the reconfigure the service to run as an Apache user.
Create a new Windows user that is a member of <strong>no</strong> groups, and reconfigure
the Apache2 service to run as that account.</p>
<p>Whichever account you are running Apache as, SYSTEM or otherwise, needs write
and modify access to the following directories and all their subdirectories.
Depending on your version of Windows, this access may already be granted.</p>
<ul class="simple">
<li><code class="file docutils literal"><span class="pre">C:\Bugzilla\data</span></code></li>
<li><code class="file docutils literal"><span class="pre">C:\Apache24\logs</span></code></li>
<li><code class="file docutils literal"><span class="pre">C:\Windows\Temp</span></code></li>
</ul>
<p>Note that <code class="file docutils literal"><span class="pre">C:\Bugzilla\data</span></code> is created the first time you run
<code class="file docutils literal"><span class="pre">checksetup.pl</span></code>.</p>
</div>
<div class="section" id="logging">
<h2>3.5.2.3. Logging<a class="headerlink" href="#logging" title="Permalink to this headline">¶</a></h2>
<p>Unless you want to keep statistics on how many hits your Bugzilla install is
getting, it's a good idea to disable logging by commenting out the
<code class="docutils literal"><span class="pre">CustomLog</span></code> directive in the Apache config file.</p>
<p>If you don't disable logging, you should at least disable logging of &quot;query
strings&quot;. When external systems interact with Bugzilla via webservices
(REST/XMLRPC/JSONRPC) they include the user's credentials as part of the URL
(in the query string). Therefore, to avoid storing passwords in clear text
on the server we recommend configuring Apache to not include the query string
in its log files.</p>
<ol class="arabic">
<li><p class="first">Find the following line in the Apache config file, which defines the
logging format for <code class="docutils literal"><span class="pre">vhost_combined</span></code>:</p>
<div class="highlight-apache"><div class="highlight"><pre><span></span><span class="nb">LogFormat</span> <span class="s2">&quot;%v:%p %h %l %u %t \&quot;%r\&quot; %&gt;s %O \&quot;%{Referer}i\&quot; \&quot;%{User-Agent}i\&quot;&quot;</span> vhost_combined
</pre></div>
</div>
</li>
<li><p class="first">Replace <code class="docutils literal"><span class="pre">%r</span></code> with <code class="docutils literal"><span class="pre">%m</span> <span class="pre">%U</span></code>.</p>
</li>
</ol>
<p>(If you have configured Apache differently, a different log line might apply.
Adjust these instructions accordingly.)</p>
</div>
<div class="section" id="using-apache-with-ssl">
<h2>3.5.2.4. Using Apache with SSL<a class="headerlink" href="#using-apache-with-ssl" title="Permalink to this headline">¶</a></h2>
<p>If you want to enable SSL with Apache, i.e. access Bugzilla from
<a class="reference external" href="https://localhost/bugzilla">https://localhost/bugzilla</a>, you need to do some extra steps:</p>
<ol class="arabic">
<li><p class="first">Edit <code class="file docutils literal"><span class="pre">C:\Apache24\conf\httpd.conf</span></code> and uncomment these lines:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">LoadModule</span> <span class="pre">ssl_module</span> <span class="pre">modules/mod_ssl.so</span></code></li>
<li><code class="docutils literal"><span class="pre">LoadModule</span> <span class="pre">socache_shmcb_module</span> <span class="pre">modules/mod_socache_shmcb.so</span></code></li>
<li><code class="docutils literal"><span class="pre">Include</span> <span class="pre">conf/extra/httpd-ssl.conf</span></code></li>
</ul>
</li>
<li><p class="first">Create your <code class="file docutils literal"><span class="pre">.key</span></code> and <code class="file docutils literal"><span class="pre">.crt</span></code> files using <code class="file docutils literal"><span class="pre">openssl.exe</span></code>
provided with Apache:</p>
<p><strong class="command">C:\Apache24\bin&gt;openssl.exe req -x509 -nodes -days 730 -newkey rsa:2048 -keyout server.key -out server.crt</strong></p>
<p><code class="file docutils literal"><span class="pre">openssl.exe</span></code> will ask you a few questions about your location and
your company name to populate fields of the certificate.</p>
</li>
<li><p class="first">Once the key and the certificate for your server are generated, move them
into <code class="file docutils literal"><span class="pre">C:\Apache24\conf</span></code> so that their location matches the
<code class="docutils literal"><span class="pre">SSLCertificateFile</span></code> and <code class="docutils literal"><span class="pre">SSLCertificateKeyFile</span></code> variables defined in
<code class="file docutils literal"><span class="pre">C:\Apache24\conf\extra\httpd-ssl.conf</span></code> (which you don't need to
edit).</p>
</li>
</ol>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This process leads to a self-signed certificate which will generate
browser warnings on first visit. If your Bugzilla has a public DNS
name, you can get a cert from a CA which will not have this problem.</p>
</div>
</div>
<div class="section" id="restart-apache">
<h2>3.5.2.5. Restart Apache<a class="headerlink" href="#restart-apache" title="Permalink to this headline">¶</a></h2>
<p>Finally, restart Apache to pick up the changes, either from the Services
console or from the command line:</p>
<p><strong class="command">C:\Apache24\bin&gt;httpd.exe -k restart</strong></p>
<hr class="docutils" />
<p>This documentation undoubtedly has bugs; if you find some, please file
them <a class="reference external" href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Bugzilla&amp;component=Documentation">here</a>.</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../index.html">
              <img class="logo" src="../_static/bugzilla.png" alt="Logo"/>
            </a></p>
  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">3.5.2. Apache on Windows</a><ul>
<li><a class="reference internal" href="#installing">3.5.2.1. Installing</a></li>
<li><a class="reference internal" href="#apache-account-permissions">3.5.2.2. Apache Account Permissions</a></li>
<li><a class="reference internal" href="#logging">3.5.2.3. Logging</a></li>
<li><a class="reference internal" href="#using-apache-with-ssl">3.5.2.4. Using Apache with SSL</a></li>
<li><a class="reference internal" href="#restart-apache">3.5.2.5. Restart Apache</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="apache.html"
                        title="previous chapter">3.5.1. Apache</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="iis.html"
                        title="next chapter">3.5.3. Microsoft IIS</a></p>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="iis.html" title="3.5.3. Microsoft IIS"
             >next</a></li>
        <li class="right" >
          <a href="apache.html" title="3.5.1. Apache"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">Bugzilla 5.0.4 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" >3. Installation and Maintenance Guide</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="web_server.html" >3.5. Web Server</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6.
    </div>
  </body>
</html>