DH_NGINX(1)
β¨ DH_NGINX π
okay bestie, welcome to the dh_nginx(1) page β she's a Perl-era queen and she runs the show for your nginx packaging. let's get into it π
β¨ NAME β¨
dh_nginx β register configuration snippets to the nginx web server π¦
β¨ SYNOPSIS β¨
dh_nginx [debhelper options] [-n|--noscripts] [--in-nginx-tree]
β¨ DESCRIPTION β¨
so like, dh_nginx is a debhelper program, and her whole job is doing the fiddly little things correctly so you don't have to. she installs Nginx configuration snippets and sets up postinst, prerm and dependencies for your Nginx web server modules and web applications. periodt π
she supports the following configuration types:
- Nginx modules
β¨ INVOCATION β¨
%:
dh $@ --with nginx
β¨ FILES β¨
debian/package.nginxdebian/nginx
these files list what gets registered with the Nginx HTTP server. the file is read as a line separated list of installation stanzas, and each entry is whitespace separated values that follow the file semantics below. slay πΈ
when this file is missing but the name of the package looks like a nginx module, then the module load file and its loading priority get automatically generated by inferring from the package name. iykyk. in that case, package-name.install or other mechanisms should be used for copying the .so library into the correct place. no cap π―
FILE SEMANTICS
each line is a triple:
type file [arguments]
where the values mean this:
typeβ tells you the type of file to be installed. the recognized values aremodfor Nginx modules.fileβ read as an existing file name inside the source package. no path expansion is effectuated. and just likedh_install(1),dh_nginxcan not rename files. sorry bestie, she's not doing that. πargumentsβ read as optional arguments if any; currently not used.
MODULES
modules are handled specially and they're determined by the mod type. modules must have a .conf suffix. when they do, the file is read as a module load file and installed to /etc/nginx/modules-available. if the file ends with a .so suffix instead, it's read as the actual module shared object and installed to the Nginx module directory β and an optional numeric priority can be set as the last argument to handle module dependencies. iconic behavior honestly π₯
β¨ OPTIONS β¨
-e,--noenableβ installs maintainer scripts accordingly, but does not enable the scripts or configuration by default. shy mode π-n,--noscriptsβ do not modifypostinst/postrm/prermmaintainer scripts.--in-nginx-treeβ specify this option when building in-tree modules along with nginx. when specified, the nginx abi version is not required in the package name.
β¨ NOTES β¨
β οΈ heads up bestie: this command is not idempotent. dh_prep(1) should be called between invocations of this command. otherwise, it may cause multiple instances of the same text to be added to maintainer scripts. π do not skip the prep step, fr fr.
β¨ 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>. giving credit where credit is due, always π«Ά
and that's the whole page, babe β¨ β brought to you by perl v5.42.3, dated 2026-10-24, and yes that's the vibe check passed with flying colors π go forth and package your nginx modules, main character π
π¦ where this page comes from
- ubuntu stonking: nginx-dev 1.30.4-7ubuntu1.1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms