Nginx';s配置文件nginx.conf是静态加载还是动态加载?

Nginx';s配置文件nginx.conf是静态加载还是动态加载?,nginx,nginx-location,Nginx,Nginx Location,nginx是否会静态加载其nginx.conf文件?有没有办法在以后更改文件的内容,并且可以动态更新?如果是,如何执行?在nginx启动时将加载配置文件,在您重新启动nginx或告诉它重新读取其配置文件之前,不会加载随后所做的更改 # Restarts nginx using systemd (which will reload the configuration) systemctl restart nginx # Reload configuration without shutt

nginx是否会静态加载其nginx.conf文件?有没有办法在以后更改文件的内容,并且可以动态更新?如果是,如何执行?

在nginx启动时将加载配置文件,在您重新启动nginx或告诉它重新读取其配置文件之前,不会加载随后所做的更改

# Restarts nginx using systemd (which will reload the configuration)    
systemctl restart nginx

# Reload configuration without shutting down nginx
nginx -s reload
# or with systemd
systemctl reload nginx

# Test configuration without loading it
nginx -t

您可以在中找到有关此的详细信息。

nginx启动时将加载配置文件,在您重新启动nginx或告诉它重新读取其配置文件之前,不会加载随后所做的更改

# Restarts nginx using systemd (which will reload the configuration)    
systemctl restart nginx

# Reload configuration without shutting down nginx
nginx -s reload
# or with systemd
systemctl reload nginx

# Test configuration without loading it
nginx -t

您可以在。

简单:否。是中找到有关这方面的更多信息。是的,你能解释一下你的答案吗。如果没有重载,我可以做新的工作。我是NGIX的新手,所以如果我缺少一些明显的东西,请原谅我。我认为重新加载是“动态的”,部分原因是它不会中断服务。nginx的Unit可能是另一个选项,但您应该更详细地描述您的场景:不,是的。是的,你能解释一下你的答案吗。如果没有重载,我可以做新的工作。我是NGIX的新手,所以如果我缺少一些明显的东西,请原谅我。我认为重新加载是“动态的”,部分原因是它不会中断服务。nginx的Unit可能是另一个选项,但您应该更详细地描述您的场景