---
name: "dh_nginx"
section: "1"
platform: "linux"
package: "nginx-dev"
version: "1.26.3-3+deb13u7"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/dh_nginx"
---

# dh\_nginx(1)

register configuration snippets to the nginx web server

## NAME

dh\_nginx - register configuration snippets to the nginx web server

## SYNOPSIS

**dh\_nginx** \[*debhelper options*\] \[**-n**\|**--noscripts**\] \[**--in-nginx-tree**\]

## DESCRIPTION

**dh\_nginx** is a debhelper program that is responsible for correctly installing Nginx configuration snippets and setting postinst, prerm and dependencies in Nginx web server modules and web applications.

It supports the following configuration types

- •

  Nginx modules

## INVOCATION

```
  %:
     dh $@ --with nginx
```

## FILES

- debian/*package*.nginx

  - debian/nginx

  Lists files to be registered with the Nginx HTTP server. The file is interpreted as line separated list of installation stanzas, where each entry consists of whitespace separated values conforming to the file semantics below.

When this file is missing but the name of the package looks like a nginx module, the module load file and its loading priority is automatically generated inferring from the package name. In this case, *package-name***.install** or other mechanisms should be used for copying the **.so** library into the correct place.

### FILE SEMANTICS

Each line consists of a triple

*type* *file* \[*arguments*\]

where the values are interpreted as follows:

*type*

Denotes the type of file to be installed. Recognized values are **mod** for Nginx modules.

*file*

Is interpreted as existing file name within the source package. No path expansion is effectuated. Just like [**dh\_install**(1)](/dh_install/1.md), **dh\_nginx** can not rename files.

*arguments*

Is inrerpreted as optional arguments if any, currently not used.

### MODULES

Modules are handled specially and are determined by the **mod** type. Modules must have a *.conf* suffix. In that case the file is interpreted as module load file and is installed to */etc/nginx/modules-available*. If the file is ending with a *.so* suffix it is interpreted as actual module shared object and is installed to the Nginx module directory, an optional numeric priority can be set as the last argument to handle module dependencies.

## OPTIONS

- **-e**, **--noenable**

  Install maintainer scripts accordingly, but do not enable the scripts or configuration by default.

- **-n**, **--noscripts**

  Do not modify *postinst*/*postrm*/*prerm* maintainer scripts.

- **--in-nginx-tree**

  Specify this option when building in-tree modules along with nginx. When specified, nginx abi version is not required in package name.

## NOTES

Note that this command is not idempotent. [**dh\_prep**(1)](/dh_prep/1.md) should be called between invocations of this command. Otherwise, it may cause multiple instances of the same text to be added to maintainer scripts.

## AUTHOR

This manual and dh\_nginx was written by Christos Trochalakis. dh\_nginx is heavily influnced by dh\_apache2 written by Arno Toell \<debian@toell.net\>.
