NGINX Unit

Bugzilla§

To run the Bugzilla bug tracking system using Unit:

  1. Install Unit with a Perl language module.

  2. Install and configure Bugzilla’s prerequisites.

  3. Install Bugzilla’s core files. Here, we install it at /path/to/app/; use a real path in your configuration.

    Note

    Unit uses PSGI to run Perl applications; Bugzilla natively supports PSGI since version 5.1.

  4. Run the following command so Unit can access the application directory:

    # chown -R unit:unit /path/to/app/
    

    Note

    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 the ps aux | grep unitd command to be sure.

    For further details, including permissions, see the security checklist.

  5. 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",
                    "uri": "/data/webdot/*.dot"
                },
    
                "action": {
                    "share": "/path/to/app$uri"
                }
            },
            {
                "action": {
                    "share": "/path/to/app$uri",
                    "types": [
                        "text/css",
                        "image/*",
                        "application/javascript"
                    ],
    
                    "fallback": {
                        "pass": "applications/bugzilla"
                    }
                }
            }
        ],
    
        "applications": {
            "bugzilla": {
                "type": "perl",
                "working_directory": "/path/to/app/",
                "script": "/path/to/app/app.psgi"
            }
        }
    }
    
  6. Upload the updated configuration. Assuming the JSON above was added to config.json:

    # curl -X PUT --data-binary @config.json --unix-socket \
           /path/to/control.unit.sock http://localhost/config/
    

    Note

    The control socket path may vary; run unitd -h or see Startup and Shutdown for details.

    After a successful update, browse to http://localhost and set up your Bugzilla installation:

    Bugzilla on Unit - Setup Screen