Answer the question
In order to leave comments, you need to log in
How to safely update nginx?
Hello. More than 4 years ago, a friend of mine set up a web server for me. I installed version 1.6.4 (I don’t know whether I collected it from sources, or installed it from the repository).
Now the task is to follow the steps from this article: https://habr.com/ru/post/158393/, which needs the ngx_http_substitutions_filter_module module. For one, I decided to kill two birds with one stone by updating nginx to the latest version. Communication with a friend has long been lost, I can’t ask him to do this.
I ask you to suggest how you can update on a combat server without painful consequences. I know for sure that the comrade did not set everything up according to the standard. For example, I have two directories, /etc/nginx/sites-primary in which there is one config per site, and /etc/nginx/sites-secondary with a single config if the config is not found in the previous folder. View config:
server {
listen 80;
server_name ~^(www\.)?(?<domain>.+)$;
Answer the question
In order to leave comments, you need to log in
The command nginx -V
will show which modules your nginx has been configured with.
config files all remain valid.
About a separate server for testing have already been advised.
Your configs should be backed up anyway, always - no one canceled a dead screw :)
Well, in the ansible/chef/etc
topic Compile on a test server (yes, even in a virtual machine on a laptop), compile the package, test it, transfer it to production.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question