Vicky
Vicky

Reputation:

Can Apache HTTP Server serve dynamic content?

Can Apache HTTP Server serve only static content? Tomcat is used to serve Servlets/JSP. Can Tomcat serve other dynamic contents like perl, PHP etc?

Upvotes: 3

Views: 6523

Answers (4)

Vinko Vrsalovic
Vinko Vrsalovic

Reputation: 340286

Apache HTTP Server (http://httpd.apache.org) has:

  • CGI support: mod_cgi. This will run almost any dynamic content, you can even write a CGI in Bash.

  • WSGI support: mod_wsgi

  • FastCGI support: mod_fcgid (CGI, but more efficient)

  • Perl support: mod_perl

  • PHP support: mod_php

  • Python support: mod_python (using mod_wsgi is recommended)

  • Ruby support: mod_ruby (thanks to David Holm)

  • Bridge to serve Java content through a servlet container such as Tomcat: mod_jk, mod_proxy_ajp

  • Plus, an API to program your own apache modules that'll enable you to do as you wish, here's a repository of some of the existing modules: http://modules.apache.org

If you meant if Tomcat can, it cannot outside of a Java environment, it is only a servlet container. That said, Java can execute some other scripting languages and thus you could write programs to generate content in all supported scripting engines.

Upvotes: 20

David Holm
David Holm

Reputation: 17970

Don't forget mod_ruby.

Upvotes: 1

Richard Nienaber
Richard Nienaber

Reputation: 10564

In a word: Yes :P

mod_perl
mod_python

Upvotes: 1

gizmo
gizmo

Reputation: 11909

Of course Apache is able to serve dynamic content! mod_perl, mod_php, and so are the modules you plug to Apache to give him the ability to serve them.

Upvotes: 1

Related Questions