<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>4.2. Web server</title><link rel="stylesheet" type="text/css" href="../../style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><meta name="keywords" content="Bugzilla, Guide, installation, FAQ, administration, integration, MySQL, Mozilla, webtools"><link rel="home" href="index.html" title="The Bugzilla Guide - 4.4.11 Release"><link rel="up" href="security.html" title="Chapter 4. Bugzilla Security"><link rel="prev" href="security-os.html" title="4.1. Operating System"><link rel="next" href="security-bugzilla.html" title="4.3. Bugzilla"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">4.2. Web server</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="security-os.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Bugzilla Security</th><td width="20%" align="right"> <a accesskey="n" href="security-bugzilla.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="security-webserver"></a>4.2. Web server</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="security-webserver-access"></a>4.2.1. Disabling Remote Access to Bugzilla Configuration Files</h3></div></div></div><p> There are many files that are placed in the Bugzilla directory area that should not be accessible from the web server. Because of the way Bugzilla is currently layed out, the list of what should and should not be accessible is rather complicated. A quick way is to run <code class="filename">testserver.pl</code> to check if your web server serves Bugzilla files as expected. If not, you may want to follow the few steps below. </p><div class="tip" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Tip"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../images/tip.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>Bugzilla ships with the ability to create <a class="glossterm" href="glossary.html#gloss-htaccess"><em class="glossterm"><code class="filename">.htaccess</code></em></a> files that enforce these rules. Instructions for enabling these directives in Apache can be found in <a class="xref" href="configuration.html#http-apache" title="2.2.4.1. Bugzilla using Apache">Section 2.2.4.1, “Bugzilla using Apache”</a> </p></td></tr></table></div><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc; "><li class="listitem"><p>In the main Bugzilla directory, you should:</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: circle; "><li class="listitem"><p>Block: <span class="simplelist"><code class="filename">*.pl</code>, <code class="filename">*localconfig*</code></span> </p></li></ul></div></li><li class="listitem"><p>In <code class="filename">data</code>:</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: circle; "><li class="listitem"><p>Block everything</p></li></ul></div></li><li class="listitem"><p>In <code class="filename">data/webdot</code>:</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: circle; "><li class="listitem"><p>If you use a remote webdot server:</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: square; "><li class="listitem"><p>Block everything</p></li><li class="listitem"><p>But allow <span class="simplelist"><code class="filename">*.dot</code></span> only for the remote webdot server</p></li></ul></div></li><li class="listitem"><p>Otherwise, if you use a local GraphViz:</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: square; "><li class="listitem"><p>Block everything</p></li><li class="listitem"><p>But allow: <span class="simplelist"><code class="filename">*.png</code>, <code class="filename">*.gif</code>, <code class="filename">*.jpg</code>, <code class="filename">*.map</code></span> </p></li></ul></div></li><li class="listitem"><p>And if you don't use any dot:</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: square; "><li class="listitem"><p>Block everything</p></li></ul></div></li></ul></div></li><li class="listitem"><p>In <code class="filename">Bugzilla</code>:</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: circle; "><li class="listitem"><p>Block everything</p></li></ul></div></li><li class="listitem"><p>In <code class="filename">template</code>:</p><div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: circle; "><li class="listitem"><p>Block everything</p></li></ul></div></li></ul></div><p>Be sure to test that data that should not be accessed remotely is properly blocked. Of particular interest is the localconfig file which contains your database password. Also, be aware that many editors create temporary and backup files in the working directory and that those should also not be accessible. For more information, see <a class="ulink" href="http://bugzilla.mozilla.org/show_bug.cgi?id=186383" target="_top">bug 186383</a> or <a class="ulink" href="http://online.securityfocus.com/bid/6501" target="_top">Bugtraq ID 6501</a>. To test, simply run <code class="filename">testserver.pl</code>, as said above. </p><div class="tip" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Tip"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../images/tip.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>Be sure to check <a class="xref" href="configuration.html#http" title="2.2.4. Web server">Section 2.2.4, “Web server”</a> for instructions specific to the web server you use. </p></td></tr></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="security-os.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="security.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="security-bugzilla.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4.1. Operating System </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 4.3. Bugzilla</td></tr></table></div></body></html>