'Will reinstalling nginx remove configs

I want to add a new module to nginx but its on production and deleting nginx configuration is not an option.

After a bit of research I noticed that I have to reinstall nginx in order to add a module to it.

So my question is, is it possible in any way to reinstall nginx (and executing the ./configure command without messing up the current nginx configuration?

All I need is to generate the .so file to copy it to the existing /usr/lib64/nginx/modules directory.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source