Commit 4c06a432 authored by nimrod's avatar nimrod
Browse files

httpd: Couple of tweaks.

1. Skip the health check requests in the logs.
2. Allow health checks from nonroutable IP addresses.
parent a0b50ed0
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@ RUN apt-get update && \
    setcap CAP_NET_BIND_SERVICE=+ep /usr/sbin/apache2 && \
    DEBIAN_FRONTEND=noninteractive apt-get purge --auto-remove -y libcap2-bin && \
    a2enmod status && \
    sed -i "s@combined@combined expr=\!(%{REMOTE_HOST}=='127.0.0.1'\&\&%{HTTP_USER_AGENT}=='Healthcheck')@" /etc/apache2/sites-available/000-default.conf && \
    sed -i 's@Require local@Require ip 127.0.0.1/8 10.0.0.0/8 172.16.0.0/12 192.0.0.0/24@' /etc/apache2/mods-available/status.conf && \
    install -d -o "$APACHE_RUN_USER" -g "$APACHE_RUN_GROUP" -m 755 "$APACHE_RUN_DIR" && \
    install -d -o "$APACHE_RUN_USER" -g "$APACHE_RUN_GROUP" -m 755 "$APACHE_LOCK_DIR" && \
    install -d -o "$APACHE_RUN_USER" -g "$APACHE_RUN_GROUP" -m 755 "$APACHE_LOG_DIR" && \
+2 −0
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@ RUN apt-get update && \
    setcap CAP_NET_BIND_SERVICE=+ep /usr/sbin/apache2 && \
    DEBIAN_FRONTEND=noninteractive apt-get purge --auto-remove -y libcap2-bin && \
    a2enmod status && \
    sed -i "s@combined@combined expr=\!(%{REMOTE_HOST}=='127.0.0.1'\&\&%{HTTP_USER_AGENT}=='Healthcheck')@" /etc/apache2/sites-available/000-default.conf && \
    sed -i 's@Require local@Require ip 127.0.0.1/8 10.0.0.0/8 172.16.0.0/12 192.0.0.0/24@' /etc/apache2/mods-available/status.conf && \
    install -d -o "$APACHE_RUN_USER" -g "$APACHE_RUN_GROUP" -m 755 "$APACHE_RUN_DIR" && \
    install -d -o "$APACHE_RUN_USER" -g "$APACHE_RUN_GROUP" -m 755 "$APACHE_LOCK_DIR" && \
    install -d -o "$APACHE_RUN_USER" -g "$APACHE_RUN_GROUP" -m 755 "$APACHE_LOG_DIR" && \
+2 −0
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@ RUN apt-get update && \
    setcap CAP_NET_BIND_SERVICE=+ep /usr/sbin/apache2 && \
    DEBIAN_FRONTEND=noninteractive apt-get purge --auto-remove -y libcap2-bin && \
    a2enmod status && \
    sed -i "s@combined@combined expr=\!(%{REMOTE_HOST}=='127.0.0.1'\&\&%{HTTP_USER_AGENT}=='Healthcheck')@" /etc/apache2/sites-available/000-default.conf && \
    sed -i 's@Require local@Require ip 127.0.0.1/8 10.0.0.0/8 172.16.0.0/12 192.0.0.0/24@' /etc/apache2/mods-available/status.conf && \
    install -d -o "$APACHE_RUN_USER" -g "$APACHE_RUN_GROUP" -m 755 "$APACHE_RUN_DIR" && \
    install -d -o "$APACHE_RUN_USER" -g "$APACHE_RUN_GROUP" -m 755 "$APACHE_LOCK_DIR" && \
    install -d -o "$APACHE_RUN_USER" -g "$APACHE_RUN_GROUP" -m 755 "$APACHE_LOG_DIR" && \