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

I'm trying to test my virtual host configuration and the below command doesn't work... how can I test this?

/usr/local/apache2/bin/httpd -S

-bash: /usr/local/apache2/bin/httpd: No such file or directory

I got the command from http://httpd.apache.org/docs/2.0/vhosts/

uname -r //returns the below
2.6.16.60-0.54.5-smp
share|improve this question

closed as not a real question by MikeyB, Wesley, Scott Pack, HopelessN00b, voretaq7 Dec 15 '12 at 5:15

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Which distro are you using? Did you compile Apache from source or install binary version via package manager? You can find out the path with which httpd or whereis httpd. –  quanta Aug 9 '11 at 16:52

1 Answer 1

up vote 4 down vote accepted

If you have installed Apache through your distribution's package management system, it'll be installed in /usr, not /usr/local.

For Fedora/RHEL/CentOS, the main executable file will be /usr/sbin/httpd, while for Debian/Ubuntu you should try /usr/sbin/apache2.

For more information about distribution-specific layout you should check this URL: http://wiki.apache.org/httpd/DistrosDefaultLayout

share|improve this answer
    
on suse its - /usr/sbin/apache2ctl –  Sean Kimball Aug 9 '11 at 17:13

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