Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Installing mod_security, the instructions direct us to add:

LoadFile /usr/lib/libxml2.so
LoadFile /usr/lib/liblua5.1.so

to httpd.conf.

I'm wondering why they might prefer LoadFile to linking with rpath / LD_RUN_PATH /etc.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Using LoadFile vs linking directly is the Apache recommended best practice. Really, it boils down to two issues:

1) Conflicts with other modules may cause strange and hard to diagnose side effects and make the order of LoadModule directives important.

2) Library versioning may cause two modules to load two different versions which may lead to overloading the symbol table and cause some serious loss of hair trying to diagnose the issue when there are crashes.

Really, PCRE should also be in there, but Apache loads this internally, which more often is the cause for a crash. Look through the mail list archives for the modsecurity user list and you will see a number of crashes due to mismatched PCRE libs. Using LoadFile would have solved those problems, but instead the admins must recompile Apache with an external PCRE lib.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.