nginx - 我可以在不重新启动服务器的情况下添加新的虚拟主机吗?
我可以使用 nginx.conf
配置文件中的 server
对象设置新的虚拟主机,而无需重新启动服务器(并且无需关闭活动连接)吗?
谢谢
Can I set a new virtual host using the server
object in the nginx.conf
configuration file, without restarting the server (and without closing the active connections)?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,你可以。
nginx -s reload
或者您可以向 nginx 进程发送
SIGHUP
。sudo Kill -HUP [nginx 的 pid]
Yes you can.
nginx -s reload
Or you can send
SIGHUP
to the nginx process.sudo kill -HUP [nginx's pid]
您可以 加载使用信号的新配置。它将
您甚至可以即时升级到新的二进制文件。请参阅同一文档。
要执行重新加载,请发送
reload
信号:You can Load New Configuration Using Signals. It will
You can even Upgrade To a New Binary On The Fly. See the same doc.
To perform the reload, send the
reload
signal: