Chapter 13. Daemon Images 13.1. Apache HTTP Server 13.1.1. Description The rhscl/httpd-24-rhel7 image provides an Apache HTTP 2.4 Server. The image can be used as a base image for other applications based on Apache HTTP web server. 13.1.2. Access To pull the rhscl/httpd-24-rhel7 image, run the following command as root : The rhscl/httpd-24-rhel7 image supports using the S2I tool. 13.1.3. Configuration and Usage The Apache HTTP Server container image supports the following configuration variables, which can be set by using the -e option with the podman run command: Variable Name Description HTTPD_LOG_TO_VOLUME By default, httpd logs into standard output, so the logs are accessible by using the podman logs command. When HTTPD_LOG_TO_VOLUME is set, httpd logs into /var/log/httpd24 , which can be mounted to host system using the container volumes. This option is allowed allowed when the container is run as UID 0 . HTTPD_MPM This variable can be set to change the default Multi-Processing Module (MPM) from the package default MPM. If you want to run the image and mount the log files into /wwwlogs on the host as a container volume, execute the following command: To run an image using the event MPM (rather than the default prefork ), execute the following command: You can also set the following mount points by passing the -v /host:/container option to the podman run command: Volume Mount Point Description /var/www Apache HTTP Server data directory /var/log/httpd24 Apache HTTP Server log directory (available only when running as root) When mouting a directory from the host into the container, ensure that the mounted directory has the appropriate permissions and that the owner and group of the directory matches the user UID or name which is running inside the container. Note The rhscl/httpd-24-rhel7 container image now uses 1001 as the default UID to work correctly within the source-to-image strategy in OpenShift. Additionally, the container image listens on port 8080 by default. Previously, the rhscl/httpd-24-rhel7 container image listened on port 80 by default and ran as UID 0 . To run the rhscl/httpd-24-rhel7 container image as UID 0 , specify the -u 0 option of the podman run command: 13.2. nginx 13.2.1. Description The rhscl/nginx-120-rhel7 image provides an nginx 1.20 server and a reverse proxy server; the image can be used as a base image for other applications based on the nginx 1.20 web server, the rhscl/nginx-118-rhel7 image provides nginx 1.18. 13.2.2. Access To pull the rhscl/nginx-120-rhel7 image, run the following command as root : To pull the rhscl/nginx-118-rhel7 image, run the following command as root : 13.2.3. Configuration The nginx container images support the following configuration variable, which can be set by using the -e option with the podman run command: Variable Name Description NGINX_LOG_TO_VOLUME By default, nginx logs into standard output, so the logs are accessible by using the podman logs command. When NGINX_LOG_TO_VOLUME is set, nginx logs into /var/opt/rh/rh-nginx120/log/nginx/ or /var/opt/rh/rh-nginx120/log/nginx/ , which can be mounted to host system using the container volumes. The rhscl/nginx-120-rhel7 and rhscl/nginx-118-rhel7 images support using the S2I tool. 13.3. Varnish Cache 13.3.1. Description The rhscl/varnish-6-rhel7 image provides Varnish Cache 6.0, an HTTP reverse proxy. 13.3.2. Access To pull the rhscl/varnish-6-rhel7 image, run the following command as root : 13.3.3. Configuration No further configuration is required. The Red Hat Software Collections Varnish Cache images support using the S2I tool. Note that the default.vcl configuration file in the directory accessed by S2I needs to be in the VCL format.

Commands:
podman pull registry.redhat.io/rhscl/httpd-24-rhel7
podman run -d -u 0 -e HTTPD_LOG_TO_VOLUME=1 --name httpd -v /wwwlogs:/var/log/httpd24:Z rhscl/httpd-24-rhel7
podman run -d -e HTTPD_MPM=event --name httpd rhscl/httpd-24-rhel7
run -u 0 rhscl/httpd-24-rhel7
podman pull registry.redhat.io/rhscl/nginx-120-rhel7
podman pull registry.redhat.io/rhscl/nginx-118-rhel7
podman pull registry.redhat.io/rhscl/varnish-6-rhel7