nginx server does not support dynamically loaded extension modules. To add a module to nginx, you need to fully compile nginx from source codes with the new module turned on and statically integrated into it.
If you are using ports, then the port variants nginx command will give you the nginx build options and the sudo port -v install nginx +gzip_static +image_filter +zip +ssl +secure_link install the http_gzip_static_module you need
The same can be done manually - download the assembly of the source codes of nginx and the modules you need, run
cd nginx-версия./configure --prefix=путь-для-установки-nginx --add-module=путь-к-модулю1 --add-module=путь-к-модулю2makemake install