nginx-ultimate-bad-bot-blocker
nginx-ultimate-bad-bot-blocker copied to clipboard
Please use relative paths instead of absolute paths in *.conf
Hi,
it would help to make the config usable on non-Linux systems (or systems where the config is not in /etc/nginx), if you would use relative paths in the config.
As an example on FreeBSD, the config is in /usr/local/etc/nginx. The config path in nginx is configured to be that. So any include directive which is not starting with a '/' is relative to this directory. I have removed "/etc/nginx/" from the config locally, so that there's only bot.d/*.conf. It would be nice if you only depend on conf.d resp. bot.d to be in the default nginx config directory to not need to make this modification after each update.
Note: the install/setup/update scripts are not usable on FreeBSD as they rely on pidof (update script) which is not available in FreeBSD, and the FreeBSD sed complains (setup script) about something too. I will look into this, and if there is an easy fix which works for Linux and FreeBSD I will provide a patch.
Bye, Alexander.
@netchild - freebsd users should install gsed
from ports
see also pidof
in freebsd
you are welcome to send a PR
for FreeBSD compatibility. If it passes the CI tests
we can merge your changes.
code readability is preferred over conciseness
pull request #349 created for the "make it work on FreeBSD" part. I thill think relative paths are better suited here, no need to play around with sed in the updater...