我使用的是Ubuntu14.04、apache2和ispconfig 3,几个小时前我不小心删除了/var/log/apache2文件夹的包含文件,现在我的服务器不能重启apache2了,我怎么恢复它们?或者,当重新启动服务器时,系统会自动创建日志文件夹和文件吗?
当我重新启动apache2时
* Restarting web server apache2 [fail]
* The apache2 configtest failed.
Output of config test was:
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.conf:61
(2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main error log
(2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for error log of vhost defined at /etc/apache2/sites-enabled/000-default.conf:1
AH00014: Configuration check failed
Action 'configtest' failed.
The Apache error log may have more information.发布于 2016-06-14 03:18:36
修复了!
sudo mkdir /var/log/apache2/
sudo touch /var/log/apache2/{access,error,other_vhosts_access,suexec}.log
sudo chown -R root:adm /var/log/apache2/
sudo chmod -R 750 /var/log/apache2发布于 2016-06-23 15:24:13
不需要更改。我只在/etc/fstab中添加了tmpfs /var/log/apache2 tmpfs defaults,noatime 0 0。然后重新启动计算机。并在我的Ubuntu 16.04上修复它。
https://stackoverflow.com/questions/37796943
复制相似问题