Webinoly is just the perfect tool for NGINX experts. Give it a try!
0 votes
1.4k views
by Rookie
edited by

Hello I was wondering if its possible to add Ultimate bad bot blocker and NAXSI, maybe as a argument?

Bad Bot Blocker (-bot-block)
NAXSI (-naxsi)
Cloudflare (-cf)

Thanks.

 

1 Answer

0 votes
by Expert

Hi mesmar,

Thanks for your suggestions, but these features are out of the scope of this project.

by Rookie
Oh that’s unfortunate. Thanks anyways for the quick answer :)
by Rookie

What is needed to add it on my own?

I've checked the internal API events and also the 'api-events_sample' file but having a hard time understanding on how to add custom commands.

Bad bot blocker (-bad-bot=on/off) and Cloudflare (-cf=on/off) would be optimal for me since NAXSI seems way too advanced and from what I saw and read it seems that I would need to compile nginx from source with some specific modules.

I think the route would be:

- site domain.com -cf=on/off
- check if domain.com exists
- check if cf config file and entry in vhost file already exist
- if not, then add it or remove it (-cf=on / -cf=off)

Same goes for -bad-bot=on/off.

Also another question:

Can I add multiple functions into the api-events file?

I just have trouble finding a starting point, if its even possible like I want it.

by Expert
You can find a lot of good tutorials in Google about "Bash scripting". You can play with the Internal-API to do whatever you want or customize the standard Webinoly behavior, you can execute any code/script you want after some exact events in Webinoly, for example, at the beginning of the "site" command.

Just check (if) for the event you want and execute any code want after that, it's just as simple as that.
by Rookie
So I could add multiple functions into the api-events file or only if/else into the pre-defined function?
by Expert
Why don't you just try it?

That's the fastest way to learn.
by Rookie
Am I going in the right direction with this?

https://pastebin.com/N9QtJTk3

It is working as I want, even though I am getting an error on the output:

root@ubuntu:~# site test.com -cf
API Status: sis
Installing cloudflare
[ERROR] Please, enter a valid option!
by Expert
Congratulations Mesmar!

Just use the "exit 0" (successfull) or "exit 1" (failed) to skip the error. "CF" is not a native Webinoly option, that's why you need to exit before reach the checking point.

Regards.
by Expert

Also, you should read this: https://webinoly.com/en/documentation/sites/#nginx

to easily include custom Nginx rules to your sites.

Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

To report a bug, please create a new issue on GitHub or ask a question here with the bug tag.
Webinoly Support Paypal Donations

PayPal · GitHub Sponsors · Bitcoin

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...