Get the arguments used to configure Nginx source

I'm currently managing an images server for a customer that uses Nginx on an old Debian 5 install. At some point they installed a version of Nginx from source, and I wanted to be able to install an updated version from source using the same command line arguments for the configure command. This post shows how to do this.

Show the version and configure options

The nice thing with Nginx is the arguments for the configure command are compiled into the binary and accessible from the command line, so you can ensure your new install is configured in exactly the same way. Simply use the -V flag like so (note it's an UPPERCASE V):