nginx and csf

bctrainers
Junior Member
Posts: 3
Joined: 09 Jun 2012, 11:10

nginx and csf

Post by bctrainers »

Hello, I've searched around for this however have not had much results.

Does ConfigServer Firefall/LFD work with the nginx installation? Ever since I swapped over to nginx, CSF went silent on attack floods on the httpd.

What do i need to provide to help get regular expressions created for the detection of such events on nginx? :confused:
OneApplications
Junior Member
Posts: 3
Joined: 23 May 2012, 19:53

Re: nginx and csf

Post by OneApplications »

I'd really like to know the same. I recently switched form Apache to Nginx and love it! Really lightweight and fast compared to Apache. Combined with PHP-FPM it really works well running my site.

One thing I don't have though is any LFD protection because, by the looks of it, CSF+LFD doesn't offer any "out of the box" supprot for reading the Nginx error logs. I know I can write my own regex for this but the whole regex thing is just a completely different language to me! I don't understand the first thing about it and I'd rather not have to learn all about it just to implement this.

What I'm actually doing at the moment is compiling a small perl script that will either run as a cron job or as a service. This will scan the nginx error log every 5 mins or so. If the log has been updated since that last read, it reads the new log lines and converts these into standard Apache v2 log format. This is then written to /var/log/httpd/error.log. LFD then scans this file as normal just as though Apache was installed and blocks any rouge IPs.

I know this may seem like a bit of a long winded work-around but until CSF supports nginx in its standard regex, I think it may be the best solution. I must stress that I haven't tested this script yet, in fact I have only just started writing it but fingers crossed it will give good results. I'll just start passing 403 and 404 errors to start with and see how it goes.

Any update from the CSF guys on whether nginx is likely to be supported in the near future would be greatly appreciated.

Cheers,

Chris.
chirpy
Moderator
Posts: 3537
Joined: 09 Dec 2006, 18:13

Re: nginx and csf

Post by chirpy »

We'll consider it for the future.
darkroast
Junior Member
Posts: 13
Joined: 01 Oct 2012, 20:05

Re: nginx and csf

Post by darkroast »

I know it's only been a couple of months, but has this made it onto the radar yet? I really like the speed boost nginx gives (along with varnish), but I get the following message
atlanta lfd[23996]: STATS: Unable to retrieve Apache Server Status [http://127.0.0.1/whm-server-status?auto] - Unable to download: Not Found
and from other things I've read, it seems like LFD doesn't work with nginx (?)
lpa
Junior Member
Posts: 7
Joined: 29 Jun 2013, 11:30

Re: nginx and csf

Post by lpa »

So, LFD still does not work with Nginx? Is it?
johnang
Junior Member
Posts: 8
Joined: 08 Jan 2012, 13:20

Re: nginx and csf

Post by johnang »

Any news on nginx support? Thanks.
websnail
Junior Member
Posts: 15
Joined: 25 Sep 2007, 23:27

Re: nginx and csf

Post by websnail »

darkroast wrote:..but I get the following message
atlanta lfd[23996]: STATS: Unable to retrieve Apache Server Status [http://127.0.0.1/whm-server-status?auto] - Unable to download: Not Found
Just as a side note to fix this issue you can do the following:
Karel
Junior Member
Posts: 28
Joined: 11 Jul 2013, 20:22
Contact:

Re: nginx and csf

Post by Karel »

Any progress on support for nginx?
DA file locations:
/var/log/nginx/error_log
/var/log/nginx/domains/*.error_log
blindpet
Junior Member
Posts: 1
Joined: 21 Nov 2015, 17:52

Re: nginx and csf

Post by blindpet »

Found this on Google and was hoping to find nginx support. I'd rather not have to use fail2ban on top of the awesome CSF, where can one contribute code to add functionality?
marcele
Junior Member
Posts: 215
Joined: 17 Sep 2007, 17:02

Re: nginx and csf

Post by marcele »

CSF already supports nginx.
Post Reply