OPENSHIFT

OpenShift HTTPD loglevel

#Red Hat , #container , #httpd , #loglevel , #logging

OpenShift HTTPD loglevel

OpenShift comes with a container image packaged from this source. To make further configuration changes check the documentation here.

  1. Create a configmap to mount a log.conf file that contains your apache loglevel configuration. Be sure to update <PROJECT_NAMESPACE> below before running this command.

echo 'apiVersion: v1
data:
  log.conf: |
    LogLevel debug
    ErrorLog /dev/stdout
    TransferLog /dev/stdout'
kind: ConfigMap
metadata:
  name: logfile
  namespace: <PROJECT_NAMESPACE>' | oc create -f -
  1. Update your deploymentConfig. Configmaps with apache configs for the image rhscl/httpd-24-rhel7 should mount to /opt/app-root/etc/httpd.d/

    $ oc volume dc mydeploymentconfig  --add --overwrite --name=logfile --mount-path=/opt/app-root/etc/httpd.d/ --source='{"configMap": { "name": "logfile"}}'