httpd binary path and httpd symbolic link to apachectl
Code:
# /usr/local/apache/bin/apachectl -M | grep rewrite
What
mickbeng posted is correct and should work OK.
[email protected] [/]# httpd -l | grep mod_rewrite
bash: httpd: command not found
Please note the full path to the installed "httpd" binary is as seen below:
Code:
# /usr/local/apache/bin/httpd -l | grep rewrite
Separate and different from the "httpd" binary, there is a symbolic link for the command "httpd" -- if the "httpd" symlink to "apachectl" is missing, as seen via stat then the symlink may need to be recreated; here is an example of stat output when the symlink is setup and is not missing:
Code:
# stat /usr/sbin/httpd | head -n2
File: `/usr/sbin/httpd' -> `/usr/local/apache/bin/apachectl'
Size: 31 Blocks: 0 IO Block: 4096 symbolic link
If it is missing and you see the following error of "cannot stat" then the symlink should be recreated:
Code:
# stat /usr/sbin/httpd | head -n2
stat: cannot stat `/usr/sbin/httpd': No such file or directory
To recreate the "httpd" symlink to "apachectl" the following example command may be used via root SSH access:
Code:
# ln -fnsv /usr/local/apache/bin/apachectl /usr/sbin/httpd