I upgraded php5 and it asked me to override a config file in apache and I stupidly said yes, so it has overridden a file. I tried to repair it, but its not working.
I had an error:
The apache2 configtest failed.
Output of config test was:
apache2: Syntax error on line 214 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/httpd.conf: No such file or directory
so I did this:
sudo touch /etc/apache2/httpd.conf
Now, i have a new error when trying to restart apache:
Output of config test was:
apache2: Syntax error on line 234 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/conf.d/: No such file or directory
Action ‘configtest’ failed.
We can certainly troubleshoot the errors you’re seeing there if you like. Just let us know what errors you’re seeing.
Worst case, you could always backup your Apache config files that you have there, then just reinstall Apache.
Out of curiosity though, were you upgrading to a new version of your distribution when that happened? Or did you perhaps enable a third party repository?
That sort of issue generally doesn’t occur when applying updates, though it could occur when upgrading to a new PHP or Apache version that doesn’t come standard with your current distribution version.