Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I installed nginx, I did not include the SSL module, but I would need that now. I found out that I need to reinstall nginx with the SSL module enabled, but I am afraid to loose my current configuration and enabled virtual hosts.

Is there a way I can add the module without loosing my current configuration? Somehow "append" the SSL module to my current nginx installation?

share|improve this question

From what I know, there is no way to "append" any module. Depending on your setup, yes, there is a way to add any module without loosing the changes in the configuration. Again, it depends on how the current setup. The better the current structure, the easier to add any module while recompiling.

Basically, copy all the files that have been modified and/or created as part of Nginx configuration. After recompiling, put those files back into the original path. Nginx doesn't complain when someone upgrades or adds something with the current setup.

In the end, just before restarting, please make sure to test the new configuration file by executing...

nginx -t -c /path/to/new/nginx.conf

share|improve this answer

Your Answer


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.