恢复 Apache 配置

恢复 Apache 配置

有人能告诉我如何从备份中恢复 apache 配置吗?来自 /etc/httpd/conf/httpd.conf.backup

答案1

我假设您有 .backup 文件。您需要做的就是:

cp /usr/local/apache/conf/httpd.conf.backup /usr/local/apache/conf/httpd.conf

然后重新启动你的 apache 服务器。

答案2

将当前配置移到另一个备份文件(httpd.conf.backup2)

mv /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.backup2

将原始备份移回原位

mv /etc/httpd/conf/httpd.conf.backup /etc/httpd/conf/httpd.conf

重启 Apache

apache2ctl restart

相关内容