Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Apache HTTP server dynamic files rendering

 
Harshana Dias
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While apache servers main goal is to serve static files but it also serve those php and other dynamic stuff too. So what are the add ons or is it in build in apache, which makes apache to serve those dynamic content?
Also isnt there anything inside apache as a container?
 
Tim Moores
Bartender
Posts: 2681
36
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's done via modules: mod_php, mod_perl etc. The connector for Tomcat is called mod_jk. See https://modules.apache.org/
 
Karthik Shiraly
Bartender
Posts: 1194
25
Android C++ Java Linux PHP Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
apache servers main goal is to serve static files

No PHP developer would agree with you .
It's true that apache httpd is often used to offload static content serving off Tomcat for java web apps. But it's more commonly used as a standalone web server for PHP web applications.
However, PHP is an optional Apache module. In fact, every functionality in Apache httpd is a "module", except for the raw html/js/image file serving. You can run Apache httpd without PHP if you want, and make it serve just static content like HTML/js/images.
Another common module that allows httpd to serve dynamic content is the CGI module, usually used for perl based web apps.

isnt there anything inside apache as a container?

Do you mean a servlet container? No, there isn't.
 
Harshana Dias
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Moores wrote:That's done via modules


Okie. so all those are modules know. which means any time we can disable those and just use apache as a static file rendering server.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18001
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Harshana Dias wrote:
Tim Moores wrote:That's done via modules


Okie. so all those are modules know. which means any time we can disable those and just use apache as a static file rendering server.


In most cases, it's more like "just don't install the modules to begin with."
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic