-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building ModSecurity Dynamic Module: Should I use ./configure --with-pcre2 for libmodsecurity and Nginx Connector? #3277
Comments
Hi @Danrancan,
A bit old, but the
These sources are the same from same repository. ModSecurity v3.0.13 = libmodsecurity3 v.3.0.13. And yes, the newest versions of Nginx prefers PCRE2, therefore it's much better if connector also uses PCRE2, and well, it's better if the library uses that too. Anyway, (old) PCRE (PCRE3) is not supported since long time, so we highly recommended to use PCRE2 where it's possible. (There could be some special cases, for eg. if the server (and the system itself) uses the old PCRE, then it's the better choice.)
yes.
If Nginx uses PCRE2, then you should use the flag |
Thanks for the clarafication. For reference, I am building the module dynamically according to this guide. I have download Nginx from source, and ModSecurity-nginx. Here are my steps for the connector Module:
However, there is no configure file in the
Like I can in the libmodsecurity3's Therefore, I tried navigating to my Nginx Source Directory in
which returned the following:
Where exactly do I put the |
Hi @Danrancan, sorry, that was my mistake: Nginx uses PCRE2 by default since 1.21.5 - see official CHANGES. And it seems now there is a chance if you want to force it to use the old PCRE: Connector uses the same PCRE version as Nginx. You should take care only the library. Sorry again. |
I am building the Modsecurity module dynamically against Nginx v1.27.2 Mainline, on Ubuntu 22.04. The Ubuntu 22.04 instructions HERE: say to use the configure flag
--with-pcre2
.Are these old Instructions?
Should I be using the
--with-pcre2
configure flag when building LibModsecurity v3.0.13 from https://github.com/owasp-modsecurity/ModSecurity ?Secondly, should I be using the
--with-pcre2
configure flag when building Modsecurity v3.0.13 from https://github.com/owasp-modsecurity/ModSecurity ?Lastly, should I be using the
--with-pcre2
configure flag when building the Modsecurity Connector Module v1.0.3 from https://github.com/owasp-modsecurity/ModSecurity-nginx ?I just want to be sure where and when I should be using the --with-pcre2 flags when attempting to build the module dynamically on Ubunut 22.04.
Thanks for the help.
The text was updated successfully, but these errors were encountered: