大网数据广告活动
网站运营与故障问答

Apache .conf files not working. Apache restarts even without ANY conf files

· 52CE 我爱测

For some reason, my apache instances have stopped updating their conf files. I am able to reboot apache without any errors logged and apache will not recognize any changes. I have gone so far as to actually try to break apache by…

问题原文

原帖链接 · Astupidmoose · CC BY-SA 3.0

For some reason, my apache instances have stopped updating their conf files. I am able to reboot apache without any errors logged and apache will not recognize any changes.

I have gone so far as to actually try to break apache by removing the </VirtualHost> tag at the end of my .conf file and rebooting only to have it restart without error.

Next I fully removed all .conf files from the apache directory and restarted. Again apache started without error.

I have run updates, upgrades, rebooted multiple times.

How is this possible? How can apache reboot while having no conf files to work with? This is affecting multiple servers of mine, not just an individual one.

已采纳解答

原帖链接 · Astupidmoose · CC BY-SA 3.0

So I solved this after many hours of going back and forth. I wanted to post incase anyone has the same issue.

Problem: Somehow, all of the 000-default.conf symlinks within my /sites-enabled folder were replaced by the actual file 000-default.conf about 2 weeks ago. This happened on approx 90% of my servers, so the incident was not isolated.

Since the symlink was broken, there was no way for it to reflect the changes, and kept rebooting based on the config which was written in its place.

Solution:

  1. Remove the 000-default.conf from /etc/apache2/sites-enabled
  2. Re-enable the site using a2ensite 000-default.conf
  3. service apache2 restart

This seems to have fixed the issue. Hopefully it helps someone else down the road. I still have no idea what caused the symlink to be overwritten by the actual file.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2016-03-11)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。