12

So I upgraded Ubuntu and I went to 127.0.0.1 in Chrome and got "Oops! Google Chrome could not connect to 127.0.0.1" so I restarted Apache but was met with this error:

apache2: Syntax error on line 215 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/httpd.conf: No such file or directory

Action 'configtest' failed. The Apache error log may have more information. ...fail!

This is the contents of my /etc/apache2 folder:

conf.d/
mods-available/
mods-enabled/
sites-available/
sites-enabled/
apache2.conf
apache2.conf.dpkg-dist
envvars
magic
ports.conf

What's going on? How can I resolve this?

2
  • It appears within your /etc/apache2/apache2.conf file, the file /etc/apache2/httpd.conf is being included or referenced. Try searching for this within your /etc/apache2/apache2.conf file to see where and provide that if you require further assistance.
    – Andrew Ty.
    Apr 19, 2013 at 4:33
  • I had the same problem after upgrading do Debian Wheezy, the accepted solution worked.
    – Petr
    Dec 10, 2014 at 20:16

1 Answer 1

16

For some reason you are missing the http.conf which usually has no content.

Please try to create it and restart your web server

touch /etc/apache2/httpd.conf

3
  • I have no idea what this means but it worked. Thanks!
    – noidea
    Apr 19, 2013 at 7:38
  • 1
    This means: You are creating an empty file called httpd.conf in /etc/apache2/ directory to overcome the error that prevented the apache to start because of the missing file.
    – Hex
    Apr 19, 2013 at 18:56
  • In my case, on debian rasperry the apache2.conf was missing. I created one. Then I got apache2: Configuration error: No MPM loaded. I reinstalled apache2 and then finally got ` mpm_event_module (shared)` with apache2 -M. Now it works.
    – Timo
    Nov 5, 2020 at 16:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .