I'm compiling Apache from source, and staticly linking
mod_ssl. I'm looking to use a different version of OpenSSL to the system-installed version. I would like to do this in a way that doesn't affect the rest of the system, which is CentOS, as I would prefer to not change the core system's SSL version, used by other installed software that will continue to be managed by the package manager.
How can I do this properly?
I've tried compiling Apache
--with-ssl which works fine for compiling it, but then it doesn't find it when trying to run it.
./httpd: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
I'm thinking that perhaps I could set
LD_LIBRARY_PATH when starting up Apache, which works fine, but not sure that's an appropriate approach. What's the recommended way to approach this? Is there a better way to add a directory for an alternative library search path?