Package Details: crowdsec-nginx-bouncer 1.0.8-1

Git Clone URL: https://aur.archlinux.org/crowdsec-nginx-bouncer.git (read-only, click to copy)
Package Base: crowdsec-nginx-bouncer
Description: CrowdSec bouncer for Nginx
Upstream URL: https://doc.crowdsec.net/docs/bouncers/nginx
Keywords: bouncer crowdsec
Licenses: MIT
Conflicts: cs-nginx-bouncer
Provides: cs-nginx-bouncer
Replaces: cs-nginx-bouncer
Submitter: FirstAirBender
Maintainer: FirstAirBender
Last Packager: FirstAirBender
Votes: 3
Popularity: 0.012685
First Submitted: 2023-10-10 07:11 (UTC)
Last Updated: 2024-04-08 17:42 (UTC)

Latest Comments

slip commented on 2023-12-29 01:44 (UTC)

Hmm, I already use nginx-mainline so it was installed from the beginning before I started. Using yay also resulted in the same. luarocks reporting everything under 5.4 but not 5.1 and nginx core dump.

Must just be an issue with my system, so I think I'll leave it at that. Appreciate the input along the way though.

FirstAirBender commented on 2023-12-29 01:25 (UTC) (edited on 2023-12-29 01:38 (UTC) by FirstAirBender)

@slip The dependencies were not found with makepkg because it tries to resolve deps using pacman, but those deps are in the AUR. I don't know how paru works, but yay has a -B option, which if combined with -i, allows you to build a local PKGBUILD. So yay -Bi . is the command to use. If paru has something similar, please use that.

As for the conflicts you're facing, I tried it myself, and I see the issue. The problem seems to be that the install process wants to install nginx before nginx-mainline. The solution I found is to install nginx-mainline first, and then proceed with the rest of the installation.

slip commented on 2023-12-29 01:22 (UTC)

I came back today to look a little more into it. Running luarocks --lua-version=5.4 list shows both the lua modules installed. Everything in the dump shows that it's looking for 5.1, so maybe it's a path issue?

slip commented on 2023-12-28 01:20 (UTC)

@FirstAirBender, I went back to try again after completely removing the package and its dependencies. I do recall getting the conflict in paru the first time around earlier today. I opted to let it replace luajit with luajit-openresty and the build failed. Running it with paru immediately after will complete the install process due to luajit-openresty now being installed. I assume it's because in paru's order, nginx-mainline-mod-lua is called before luajit-openresty, and it has luajit as a dependency and therefore creates the conflict. Just a guess though.

Ignoring that route, I also tried building it with makepkg. I cloned the package, ran makepkg -sir and it instantly quit out with errors about dependencies.

Here's a link to both install logs. The makepkg run is first and then starting on line 25 is the paru output. Hopefully these are legitimate errors and not just something I'm doing wrong.

https://pastes.io/jdwdj9ln0b

slip commented on 2023-12-27 22:59 (UTC)

Okay, that's good to know. Initially I used paru, but also built it directly with makepkg as a sanity check earlier. I'll attempt it again. Thanks.

FirstAirBender commented on 2023-12-27 22:54 (UTC) (edited on 2023-12-27 22:55 (UTC) by FirstAirBender)

@slip it looks like the installation did not succeed. You may want to try to re-install or post the output of the installation if re-install did not succeed.

The post_install script should have installed those lua packages needed (lua-resty-http and lua-cjson)

slip commented on 2023-12-27 22:36 (UTC)

Rocks installed for Lua 5.1 ---------------------------

FirstAirBender commented on 2023-12-27 22:26 (UTC) (edited on 2023-12-27 22:37 (UTC) by FirstAirBender)

@slip What do you get when you type luarocks --lua-version=5.1 list?

Also, yes, the only requirement is that you include the config file in your nginx.conf file

slip commented on 2023-12-27 19:37 (UTC)

Hey there, thanks for creating this package. I've just started to dabble in crowdsec and installed this package, however, I'm getting an error upon starting nginx. The crux of it appears to be -

init_by_lua error: /etc/nginx//lua/plugins/crowdsec/crowdsec.lua:5: module 'resty.http' not found:

I've never used, well, any of these packages before. Is the only requirement to setup crowdsec and then add the include line from the install notes?

FirstAirBender commented on 2023-04-18 15:31 (UTC) (edited on 2023-07-05 05:09 (UTC) by FirstAirBender)

No longer an issue
Known issues

Comment the following line in /etc/nginx/conf.d/crowdsec_nginx.conf

#lua_ssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;

Issue opened at the respective repository: https://github.com/openresty/lua-nginx-module/issues/2180

Current solution:

When building nginx-mainline-mod-lua, modify the PKGBUILD file and add the --with-http_ssl_module flag. See https://aur.archlinux.org/packages/nginx-mainline-mod-lua#comment-910860:

--with-compat \
--with-ld-opt='-lpcre -Wl,-E'  \
--with-http_ssl_module \