What is an Apache Web Server Container?

Problem scenario
You are reading about Apache Web Server containers. These are not related to Docker containers. You often see them near or tags. What are Apache Web Server containers?

Answer
They are portions of text that contain Apache web server configuration. (The source of this is https://httpd.apache.org/docs/2.4/sections.html.) The configuration includes directives often related to the VirtualHost in Apache web server. (To read what a VirtualHost in Apache is, see this posting.)

There are two basic types of containers. Most containers are evaluated for each request. The enclosed directives are applied only for those requests that match the containers. The <IfDefine>, <IfModule>, and <IfVersion> containers, on the other hand, are evaluated only at server startup and restart. If their conditions are true at startup, then the enclosed directives will apply to all requests. If the conditions are not true, the enclosed directives will be ignored.

https://httpd.apache.org/docs/2.4/sections.html

The containers can be individual files if their names end with ".conf" (according to https://wiki.centos.org/TipsAndTricks/ApacheVhostDir).

Containers can be at the bottom of the httpd.conf file to support different website domains (according to page 819 of RHCSA/RHCE Linux Certification Study Guide Sixth Edition by Jang (McGrawHill)).

See also What Is a Container in I.T.?

Leave a comment

Your email address will not be published. Required fields are marked *