this tap is designed specifically for a custom build of NGINX with more module options. https://github.com/denji/homebrew-nginx
Once the tap is installed, you can install nginx-full with optional additional modules:
brew tap denji/nginx
brew install nginx-full --with-headers-more-module
For a list of available configuration options run:
brew options nginx-full
brew info nginx-full
You are free to install this version alongside a current install of NGINX from Homebrew/homebrew if you wish. However, they cannot be linked at the same time. To switch between them use brew's built in linking system.
brew unlink nginx
brew link nginx-full
# At this point, you can use a direct command like `nginx -s reload`, but to start services, use the following `nginx-full` command
brew info nginx
brew services start nginx (Will not start successfully)
brew services start nginx-full (Successful start)