Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
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 '13 at 4:33
    
I had the same problem after upgrading do Debian Wheezy, the accepted solution worked. –  Petr Pudlák Dec 10 at 20:16

2 Answers 2

up vote 6 down vote accepted

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

share|improve this answer
    
I have no idea what this means but it worked. Thanks! –  noidea Apr 19 '13 at 7:38
    
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 '13 at 18:56

Usually, http.conf should not have any content. But, it is filled with data in the http.conf. Once I removed the contents, it started working.

share|improve this answer
1  
Are you really suggesting someone delete the contents of http.conf? –  Robbie Mckennie Jul 24 '13 at 7:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.