halwa raj wrote:
So why do we use Apache web server?
A number of reasons, although not everyone does use both Apache and Tomcat. Tomcat is easiest to configure and manage when using a named application context instead of just dumping the app under the root context ("/"). Apache makes it fairly simple to provide virtual hosts for each app where each virtual host serves up the
Java webapp under its root context.
Apache has the ability that allows it to run as a user (non-root) process while still listening on port 80, which makes for a more secure system.
Apache supports multiple platforms, so if you have not only Java, but PHP, Perl, Python, binary cgi and more.
Apache has a lot of useful plug-in modules for things like proxying, URL rewriting and other infrastructure-supporting features.
At one time, Apache gave a significant
boost to serving static resources such as images, but that's pretty much history now.