How to start Nginx as service with this module?
According to this documentation, it says:
This module is not built by default, it should be enabled with the --with-http_sub_module configuration parameter.
I don't understand where to enter this command. Is it nginx service start --with-http_sub_module
? That is so confusing.
When I enter nginx -V
it shows that --with-http_sub_module
is available.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With