File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Linux / UNIX and the fly likes Apache Web Server Version and Type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Apache Web Server Version and Type" Watch "Apache Web Server Version and Type" New topic

Apache Web Server Version and Type

Stan Levine

Joined: Jan 21, 2001
Posts: 22
I purchased and installed Red Hat Linux 7.0. It included the Apache Web Server. I would like to know:
1) how can I find out what version of apache is included with Linux 7.0
2) How can I find out if it is the source code version or a binary version.
James Hobson
Ranch Hand

Joined: Aug 28, 2001
Posts: 140
rpm -qa |grep apache
rpm -qa |grep httpd
It will have the binary, and probably the source as well.
I would go to to get the latest source and compile it yourself (you will probably end up doing that yourself anyway, because you will want to compile with diffenernt options).
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17423

Red Hat Linux comes with a source code CD, but the two "install" CD's are binary. Since they use the Red Hat Package Manager (RPM), you can always query what's installed, but unless you explicitly installed from the source CD, all you have is the binary.
Although you can query rpm for the Apache Version, the authoritative answer is the one that Apache itself gives, The command for that is:
/usr/sbin/httpd -v
There are security-related updates for Apache since the RedHat 7.0 release. They recommend that you run at least version 1.3.20, You can download update RPMs from as well as many mirror sites.
If you want to build from source, the freshest is always at Unless you're into experimental, avoid the Apache 2.0 and download the latest 1.3 version. Warning: you'll muddy the RPM management of apache if you build this way. Also, the default apache build configuration doesn't always put files in the same places that Red Hat does. As in many Linux products, the simplest stand-alone way is to place the component in its own private directories, but the simplest way when considering the OS as a whole is to splatter the binaries, config files, libs, etc. into the system-wide directories. That's a job that's really only practical if you use something like RPM to track what goes where.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Apache Web Server Version and Type
jQuery in Action, 3rd edition