【发布时间】:2021-06-05 21:40:17
【问题描述】:
我不小心删除了 nginx.conf。我害怕现在重新启动nginx。 nginx 现在正在从我不知道的位置获取其配置。 我可以恢复它吗?从缓存或类似的东西? 我的服务器是 ubuntu 20.04
【问题讨论】:
我不小心删除了 nginx.conf。我害怕现在重新启动nginx。 nginx 现在正在从我不知道的位置获取其配置。 我可以恢复它吗?从缓存或类似的东西? 我的服务器是 ubuntu 20.04
【问题讨论】:
如果 nginx 仍在运行,您可以尝试使用 -T 标志转储配置文件
nginx -T 或
/usr/sbin/nginx -T
否则请尝试以下答案:
https://unix.stackexchange.com/questions/599996/restore-deleted-version-of-nginx-configuration
https://serverfault.com/questions/361421/dump-nginx-config-from-running-process