4.3. Webserver

4.3.1. Disabling Remote Access to Bugzilla Configuration Files

There are many files that are placed in the Bugzilla directory area that should not be accessable from the web. Because of the way Bugzilla is currently layed out, the list of what should and should not be accessible is rather complicated. A new installation method is currently in the works which should solve this by allowing files that shouldn't be accessible from the web to be placed in a directory outside the webroot. See bug 44659 for more information.

Tip

Bugzilla ships with the ability to create .htaccess files that enforce these rules. Instructions for enabling these directives in Apache can be found in Section 2.2.4.1

Be sure to test that data that should not be accessed remotely is properly blocked. Of particular intrest 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 accessable. For more information, see bug 186383 or Bugtraq ID 6501. To test, simply point your web browser at the file; for example, to test mozilla.org's installation, we'd try to access http://bugzilla.mozilla.org/localconfig. You should get a "403 Forbidden" error.

Tip

Be sure to check Section 2.2.4 for instructions specific to the webserver you use.

4.3.2. Using mod_throttle to Prevent a DOS

Note

This section only applies to people who have chosen the Apache webserver. It may be possible to do similar things with other webservers. Consult the documentation that came with your webserver to find out.

It is possible for a user, by mistake or on purpose, to access the database many times in a row which can result in very slow access speeds for other users (effectively, a DOS attack). If your Bugzilla installation is experiencing this problem, you may install the Apache module mod_throttle which can limit connections by IP address. You may download this module at http://www.snert.com/Software/mod_throttle/. Follow the instructions to install into your Apache install. The command you need is ThrottleClientIP. See the documentation for more information.