TEXT   12

Apache

Guest on 3rd August 2022 01:42:36 AM

  1. Apache
  2. ******
  3.  
  4. You have two options for running Bugzilla under Apache - mod_cgi (the
  5. default) and mod_perl. mod_perl is faster but takes more resources.
  6. You should probably only consider mod_perl if your Bugzilla is going
  7. to be heavily used.
  8.  
  9. These instructions require editing the Apache configuration file,
  10. which is:
  11.  
  12. * Fedora/Red Hat: "/etc/httpd/conf/httpd.conf"
  13.  
  14. * Debian/Ubuntu: "/etc/apache2/apache2.conf"
  15.  
  16. * Mac OS X: "/etc/apache2/httpd.conf"
  17.  
  18. Alternatively, on Debian or Ubuntu, you can instead put the below code
  19. into a separate file in the directory "/etc/apache2/sites-enabled/".
  20.  
  21. In these instructions, when asked to restart Apache, the command is:
  22.  
  23. **sudo apachectl start**
  24.  
  25. (or run it as root if your OS installation does not use sudo).
  26.  
  27.  
  28. Securing Apache
  29. ===============
  30.  
  31. When external systems interact with Bugzilla via webservices
  32. (REST/XMLRPC/JSONRPC) they include the user's credentials as part of
  33. the URL (in the "query string"). Therefore, to avoid storing passwords
  34. in clear text on the server we recommend configuring Apache to not
  35. include the query string in its log files.
  36.  
  37. 1. Edit the Apache configuration file (see above).
  38.  
  39. 2. Find the following line in the above mentioned file, which
  40.    defines the logging format for "vhost_combined":
  41.  
  42.       LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
  43.  
  44. 3. Replace "%r" with "%m %U".
  45.  
  46. 4. Restart Apache.
  47.  
  48.  
  49. Apache with mod_cgi
  50. ===================
  51.  
  52. To configure your Apache web server to work with Bugzilla while using
  53. mod_cgi, do the following:
  54.  
  55. 1. Edit the Apache configuration file (see above).
  56.  
  57. 2. Create a "<Directory>" directive that applies to the location of
  58.    your Bugzilla installation. In this example, Bugzilla has been
  59.    installed at "/var/www/html/bugzilla". On Mac OS X, use
  60.    "/Library/WebServer/Documents/bugzilla".
  61.  
  62.    <Directory /var/www/html/bugzilla>
  63.      AddHandler cgi-script .cgi
  64.      Options +ExecCGI +FollowSymLinks
  65.      DirectoryIndex index.cgi index.html
  66.      AllowOverride All
  67.    </Directory>
  68.  
  69. These instructions allow Apache to run .cgi files found within the
  70. Bugzilla directory; instructs the server to look for a file called
  71. "index.cgi" or, if not found, "index.html" if someone only types the
  72. directory name into the browser; and allows Bugzilla's ".htaccess"
  73. files to override some global permissions.
  74.  
  75. On some Linux distributions you will need to enable the Apache CGI
  76. module. On Debian/Ubuntu, this is done with:
  77.  
  78. **sudo a2enmod cgi**
  79.  
  80. If you find that the webserver is returning the Perl code as text
  81. rather than executing it, then this is the problem.
  82.  
  83.  
  84. Apache with mod_perl
  85. ====================
  86.  
  87. Some configuration is required to make Bugzilla work with Apache and
  88. mod_perl.
  89.  
  90. Note: It is not known whether anyone has even tried mod_perl on Mac
  91.   OS X.
  92.  
  93. 1. Edit the Apache configuration file (see above).
  94.  
  95. 2. Add the following information, substituting where appropriate
  96.    with your own local paths.
  97.  
  98.       PerlSwitches -w -T
  99.       PerlConfigRequire /var/www/html/bugzilla/mod_perl.pl
  100.  
  101.    Note: This should be used instead of the <Directory> block shown
  102.      above. This should also be above any other "mod_perl" directives
  103.      within the "httpd.conf" and the directives must be specified in
  104.      the order above.
  105.  
  106.    Warning: You should also ensure that you have disabled
  107.      "KeepAlive" support in your Apache install when utilizing
  108.      Bugzilla under mod_perl or you may suffer a performance penalty.
  109.  
  110. On restarting Apache, Bugzilla should now be running within the
  111. mod_perl environment.
  112.  
  113. Please bear the following points in mind when considering using
  114. Bugzilla under mod_perl:
  115.  
  116. * mod_perl support in Bugzilla can take up a HUGE amount of RAM -
  117.   easily 30MB per httpd child. The more RAM you can get, the better.
  118.   mod_perl is basically trading RAM for speed. At least 2GB total
  119.   system RAM is recommended for running Bugzilla under mod_perl.
  120.  
  121. * Under mod_perl, you have to restart Apache if you make any manual
  122.   change to any Bugzilla file. You can't just reload--you have to
  123.   actually *restart* the server (as in make sure it stops and starts
  124.   again). You *can* change "localconfig" and the "params" file
  125.   manually, if you want, because those are re-read every time you load
  126.   a page.
  127.  
  128. * You must run in Apache's Prefork MPM (this is the default). The
  129.   Worker MPM may not work -- we haven't tested Bugzilla's mod_perl
  130.   support under threads. (And, in fact, we're fairly sure it *won't*
  131.   work.)
  132.  
  133. * Bugzilla generally expects to be the only mod_perl application
  134.   running on your entire server. It may or may not work if there are
  135.   other applications also running under mod_perl. It does try its best
  136.   to play nice with other mod_perl applications, but it still may have
  137.   conflicts.
  138.  
  139. * It is recommended that you have one Bugzilla instance running
  140.   under mod_perl on your server. Bugzilla has not been tested with
  141.   more than one instance running.
  142.  
  143. ======================================================================
  144.  
  145. This documentation undoubtedly has bugs; if you find some, please file
  146. them here.

Raw Paste


Login or Register to edit or fork this paste. It's free.