1
sudo apt-get install python-software-properties
sudo apt-get update;
sudo apt-get install php5

I ran these commands and updated my php, but now I cannot connect to localhost. When I try to restart apache2 it says:

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

Action 'configtest' failed.
The Apache error log may have more information.
Brad
  • 159,648
  • 54
  • 349
  • 530
  • As the error message says, there is a syntax error on line 214 of your config file. Apache won't start because it can't read your config file, which is why you can't connect to Apache. Edit your config file and see what's in there. Sometimes the automatic installers for things don't know how to handle a config file that may have been modified. In any case, we can't help you without knowing what's on that line. – Brad Mar 30 '14 at 05:39
  • @Brad it is Include httpd.conf on that line...but apparently there is no such file and i dont know where to find it –  Mar 30 '14 at 05:59
  • You can find your httpd.conf file [here's an link](http://stackoverflow.com/questions/12202021/where-is-my-httpd-conf-file-located-apache). It's probably inside `/etc/apache2/` – Mathlight Mar 30 '14 at 06:19

1 Answers1

0

Create the httpd.conf file and restart apache2 , it will work

touch /etc/apache2/httpd.conf
Muzammil
  • 161
  • 1
  • 2
  • 12