I broke apache2.. /etc/apache2/apache2.conf file

4 posts / 0 new
Last post
#1 Thu, 04/02/2015 - 00:28
gkuberski

I broke apache2.. /etc/apache2/apache2.conf file

I broke apache2.. /etc/apache2/apache2.conf file

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.

I am lost...

Please help.

Thu, 04/02/2015 - 08:52
andreychek

Howdy,

It sounds like you're missing /etc/apache2/conf.d/, which is where a number of Apache config files reside.

You may want to try re-creating that directory, though if those config files no longer exist, that could be a problem...

-Eric

Thu, 04/02/2015 - 17:59
gkuberski

Hey- Kinda new, kinda not...

I think my best option is to backup my web files and sql and reinstall..

I wish I could find someone to help me.

-Graham

Thu, 04/02/2015 - 22:03
andreychek

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.

-Eric

Topic locked