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

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

1 Answer 1

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

 
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.