Skip to content

Commit 984282b

Browse files
rr404jdvLaurenceJJones
authored
Adding warning about incompatibility wiht ubuntu 22 (#759)
* adding warning about incompatibility wiht ubuntu 22 * adding link form install section to FAQ * adding metrics bubble --------- Co-authored-by: jdv <julien@crowdsec.net> Co-authored-by: Laurence Jones <laurence.jones@live.co.uk>
1 parent f4bb1de commit 984282b

1 file changed

Lines changed: 24 additions & 1 deletion

File tree

crowdsec-docs/unversioned/bouncers/nginx.mdx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import RemediationSupportBadges from '@site/src/components/RemediationSupportBad
3131
<RemediationSupportBadges
3232
Mode
3333
Appsec
34+
Metrics
3435
/>
3536

3637
A lua Remediation Component for nginx.
@@ -61,6 +62,11 @@ Install the following packages:
6162
sudo apt install nginx lua5.1 libnginx-mod-http-lua luarocks gettext-base lua-cjson
6263
```
6364

65+
::::warning
66+
If you have Unbuntu 22.xx, you may have an issue with `lua` module in nginx.
67+
Look at [FAQ for more information](#ubuntu-22xx-getting-lua-error).
68+
::::
69+
6470
### Using packages
6571

6672
First, [setup crowdsec repositories](/docs/next/getting_started/install_crowdsec#install-our-repositories).
@@ -302,9 +308,26 @@ Here is a config example, but you can change values:
302308
resolver 8.8.8.8 ipv6=off;
303309
lua_ssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;
304310
```
305-
306311
And restart Nginx.
307312
313+
### Ubuntu 22.xx getting lua error
314+
315+
On Ubuntu 22.xx, the default NGINX package does not include the `lua` module due to compatibility issues with other modules. This has been resolved in later versions of Ubuntu.
316+
317+
#### How to fix it
318+
319+
You have a few options to resolve this issue:
320+
321+
- **Upgrade to Ubuntu 24.04 or later**
322+
The `lua` module is included again in newer Ubuntu releases.
323+
324+
- **Use OpenResty instead of NGINX**
325+
OpenResty is a drop-in replacement for NGINX that includes the `lua` module by default.
326+
> Note: OpenResty uses slightly different service names and paths, but configuration remains compatible with standard NGINX.
327+
328+
- **Manually compile the lua module**
329+
This is a more advanced approach and requires manual steps to build and install the module yourself.
330+
308331
## Configuration Reference
309332
310333
### `API_KEY`

0 commit comments

Comments
 (0)