Ubuntu: apache error AH00526: Syntax error on line 1 of -c/-C directives:


I recently upgraded to php56. Now I am unable to run apache.

I am getting:-

This site can’t be reached  localhost refused to connect.  

when trying to run localhost

When I run the command httpd -t -c httpd.conf, it throws the following error:-

AH00526: Syntax error on line 1 of -c/-C directives:  Invalid command 'httpd.conf', perhaps misspelled or defined by a module not included in the server configuration  

apachectl configtest does not throw any errors. No logs in apache logs either.

Can anyone help me fix this. If you need any more details please tell me.


Use the -f instead of the -c switch to specify a config file, like

httpd -t -f httpd.conf  

Make sure httpd.conf is the the current directory.


Got it. It was because httpd.conf was unable to load libphp5.so LoadModule php5_module libexec/apache2/libphp5.so If I comment this. Apache starts working.

But it should've logged in the errors. Don't know why it didn't log any error. Anyways thanks @FlorianDeish for the help.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »