问题
When running the bncert-tool on my LightSail server, I have accidentally modified some of Apache's configuration files which I now need to revert from the backup directories. See previous question and answer here for more info: Modified Bncert command has taken site offline
I have looked in both the /opt/bitnami/apache2/conf
and /opt/bitnami/apache2/conf/bitnami
directories and can see a series of files including httpd.conf.back.202101220056 (/conf) and bitnami.conf.back.202101220056 (/bitnami).
My question is which backup files do I need need to copy to which location? I assume it is performed via a 'mv' command.
Many thanks for your help.
回答1:
On a bitnami stack the main Apache server configuration file is (httpd.conf)
When you are configuring server for SSL this is usually done in the file (bitnami.conf)
I would start by replacing the current bitnami.conf with the original bitnami.conf. Then restart your server so that the changes that effect. bitnami.conf is located in the directory apache2/conf/bitnami
If that does not fix it then replace the current httpd.conf with the original httpd.conf. Then restart your server so that the changes that effect. httpd.conf is located in the directory apache2/conf .
Note you will find it a lot easier to modify server files if you connect to your server with FileZilla. You can delete and drag and drop to copy files with FileZilla.
来源:https://stackoverflow.com/questions/65860077/how-to-restore-apache-configuration-file-in-bitnami