If you see --with-http_sub_module
in nginx -V
output, you can be certain that the module is already built in. So simply use its directives in configuration file, there is no need to do any special magic to load the module itself.
Now as to why documentation says:
This module is not built by default, it should be enabled with the --with-http_sub_module configuration parameter.
This applies to when you compile nginx yourself, e.g. run the standard ./configure && make && make install
. So the module is not installed by default if you run ./configure
without arguments.
But its worth noting that most packaged nginx builds (ones that you get from yum install nginx
or e.g. apt install nginx
) would have custom ./configure
command, which (as in your case) already likely had the --with-http_sub_module
as one of the configuration switches.