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.nginx
  • debian/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 are mod for Nginx modules.
  • file β€” read as an existing file name inside the source package. no path expansion is effectuated. and just like dh_install(1), dh_nginx can 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 modify postinst/postrm/prerm maintainer 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