Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to know where is the location ($APACHE_ROOT) of the Apache installation in Centos 5.7

bash# $APACHE_ROOT/bin/apxs -iac mod_evasive.c
share|improve this question
Hmmm....where did you find this specific line of code? – mdpc Nov 8 '11 at 0:42

The instructions you read assume that Apache is compiled from the source. If you didn't, just install the httpd-devel package:

# yum -y install httpd-devel

/usr/sbin/apxs comes from this package, you can check by running:

# yum provides *bin/apxs
share|improve this answer
ok Thank you i guess with that answer i dont need to know where the apache installation directory is , apxs is in /usr/sbin – josiland Nov 7 '11 at 10:49
There is a difference between compiling from source and installing from binary. When you compile from source, all the binaries, libraries, ... go to the --prefix path or /usr/local by default. But if you install with yum/rpm, the binaries are installed to /usr/(s)bin, the libraries go to /usr/lib, ... – quanta Nov 7 '11 at 10:57

Depends on how you've installed it. Default setting is /usr/local/apache2. If it's not there you can find it with "locate apxs"

share|improve this answer
that command display anything about apxs – josiland Nov 7 '11 at 9:43
I don't understand your comment. If you know where apxs is, you know where APACHE_ROOT is. – moodywoody Nov 7 '11 at 9:49
excuse my english when i put locate apxs nothing display – josiland Nov 7 '11 at 10:08
In this case it is not installed. It's not part part of httpd rpm. – moodywoody Nov 7 '11 at 10:27
but apart it is not installed where is Apache installation directory, – josiland Nov 7 '11 at 10:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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