Closed amsnek closed 2 years ago
also, if i copy modsecurity from /storage/modsecurity to /usr/local ... it finds the library (??)
adding module in /volume/build/work/modsecurity/modsecurity-nginx-v1.0.3/
checking for ModSecurity library ... not found
checking for ModSecurity library in /usr/local/modsecurity ... found
+ ngx_http_modsecurity_module was configured
Hello @amsnek ,
I'm not entirely clear on what steps you have followed, or what your motive is for attempting to use a 'custom compiled library'.
By default, if you have successfully built ModSecurity, the subsequent make install
will, by default, place the libmodsecurity.so.* files in /usr/local/modsecurity/lib. And that is where your other step will look for it.
Hello @martinhsv
sorry for the phrasing, with custom compiled I just ment "manually compiled"
I wanted to install (make install) the modsecurity files on a different location (--prefix=) then /usr/local -> /storage/modsecurity instead of /usr/local, which isnt that unusual?
but it seems the environment variables MODSECURITY_LIB / MODSECURITY_INC are not effective to point to a different path?
intention: use --prefix to install modsecurity files to a different path then /usr/local
right now i am using the workaround to create a symlink to /usr/local/modsecurity ... but that seems wrong. Why have the --prefix or MODSECURITY_LIB / MODSECURITY_INC if /usr/local needs to be used
I feel like I am overlooking something obvious?
Ok, now I understand what you are trying to do.
I suspect you have two problems:
First, because your assignment to MODSECURITY_INC is meant to be an analogue of https://github.com/SpiderLabs/ModSecurity-nginx/blob/d59e4ad121df702751940fd66bcc0b3ecb51a079/config#L59 ...
... then you might want to check whether the assignment actually requires the last path segment. I.e. I suspect what you really want is MODSECURITY_INC="/storage/modsecurity/include/"
.
Secondly, you probably want to include the variables on this same line as the execution of the command (rather than relying on export):
MODSECURITY_LIB="/storage/modsecurity/lib/" MODSECURITY_INC="/storage/modsecurity/include/" ./configure --with-compat --add-dynamic-module=/opt/ModSecurity-nginx
hello @martinhsv,
thanks! I think you are spot on with "secondly" 🙈 will try that first thing next chance. I think this can be closed then... somehow I failed to realise that...
thank @martinhsv that was the case obviously 👍
I have compiled libmodsecurity (libmodsecurity.so.3.0.7) and i am trying to compile modsecurity-nginx I am pointing it to the custom compiled library with the environment variables
The Folder for MODSECURITY_LIB has the following contents:
The Folder for MODSECURITY_INC has the following contents:
but configure results in "not finding the library" -> what am i missing here?