Bugzilla
To run the Bugzilla bug tracking system using Unit:
-
Install Unit with a Perl language module.
-
Install and configure Bugzilla’s prerequisites.
-
Install Bugzilla`s core files. Here we install them at /path/to/app; use a real path in your configuration.
Unit uses PSGI to run Perl applications; Bugzilla natively supports PSGI since version 5.1. -
Change ownership:
Run the following command (as root) so Unit can access the application directory (If the application uses several directories, run the command for each one):
# chown -R unit:unit /path/to/app/ # User and group that Unit's router runs as by default
The unit:unit user-group pair is available only with official packages , Docker images, and some third-party repos. Otherwise, account names may differ; run theps aux | grep unitd
command to be sure.For further details, including permissions, see the security checklist.
-
Next, prepare the Bugzilla configuration for Unit. The default .htaccess scheme roughly translates into the following (use real values for share, script, and working_directory):
{ "listeners": { "*:80": { "pass": "routes" } }, "routes": [ { "match": { "source": "192.20.225.0/24", "_comment_source": "Well-known IP range", "uri": "/data/webdot/*.dot" }, "_comment_match": "Restricts access to .dot files to the public webdot server at research.att.com", "action": { "share": "/path/to/app$uri", "_comment_share": "Serves static files that match the conditions above" } }, { "action": { "share": "/path/to/app$uri", "_comment_share": "Unconditionally serves remaining requests that target static files", "types": [ "text/css", "image/*", "application/javascript" ], "_comment_types": "Enables sharing only for certain file types", "fallback": { "pass": "applications/bugzilla" }, "_comment_fallback": "Serves any requests not served with the 'share' immediately above" } } ], "applications": { "bugzilla": { "type": "perl", "working_directory": "/path/to/app/", "_comment_working_directory": "Path to the application directory; use a real path in your configuration", "script": "/path/to/app/app.psgi", "_comment_script": "Path to the application directory; use a real path in your configuration" } } }
-
Upload the updated configuration.
Assuming the JSON above was added to
config.json
. Run the following command as root:# curl -X PUT --data-binary @config.json --unix-socket \ /path/to/control.unit.sock \ # Path to Unit's control socket in your installation http://localhost/config/ # Path to the config section in Unit's control API
After a successful update, browse to http://localhost and set up your Bugzilla installation: