Httpd -t not working on Ubuntu for Apache

apache-2.2httpd

When I navigate to /opt/apache-tomcat-7.0.11/bin which is my Apache install directory and I try to do something like this:

httpd -t

I get this kind of an error:

No command 'httpd' found, did you mean:
 Command 'dhttpd' from package 'dhttpd' (universe)
 Command 'xttpd' from package 'xtide' (universe)
 Command 'thttpd' from package 'thttpd' (universe)

Any idea why that would happen? The suggestions of the 3 commands do not work either 🙂

Best Answer

Try using the command

apache2ctl

If there is a httpd bin file in that directory then you need to put a . in front of the command

./httpd -t