Skip to content

Commit

Permalink
Merge pull request #5 from MaastrichtUniversity/DHDO-64
Browse files Browse the repository at this point in the history
Dhdo 64
  • Loading branch information
lwinckers committed Jan 19, 2022
2 parents 1788d45 + 5b674cb commit 4808f96
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ RUN ( yum -y install wget nano \
boost boost-system boost-filesystem \
boost-chrono boost-regex boost-thread \
jansson fuse-libs \
httpd)
httpd initscripts \
ca-certificates )

# create temporary directory
RUN ( mkdir -p /tmp )
Expand Down
6 changes: 5 additions & 1 deletion config/davrods-vhost.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
# its default options.
#
<VirtualHost *:80>
# We override the logfile location here so we can send these logs via Filebeat
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
ErrorLog /var/log/httpd/apache.error.log
CustomLog /var/log/httpd/apache.access.log proxy

# Enter your server name here.
ServerName www.example.com
Expand Down Expand Up @@ -149,4 +153,4 @@
# For HTTPS-only access, change the port at the start of the vhost block
# from 80 to 443 and add your SSL options below.

</VirtualHost>
</VirtualHost>
4 changes: 2 additions & 2 deletions filebeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ filebeat.inputs:
json.overwrite_keys: true
enabled: true
paths:
- /var/log/httpd/access.log
- /var/log/httpd/error.log
- /var/log/httpd/apache.access.log
- /var/log/httpd/apache.error.log
tags: ["DAVRODS"]

# Disable filebeat monitoring
Expand Down
5 changes: 4 additions & 1 deletion run-httpd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ if [ -f /config/irods_environment.json ]; then
chmod 0644 /etc/httpd/irods/irods_environment.json
fi

# Start filebeat
/etc/init.d/filebeat start

# start the apache daemon
exec /usr/sbin/apachectl -DFOREGROUND

# this script must end with a persistent foreground process
tail -F /var/log/httpd/access.log /var/log/httpd/error.log |awk '/^==> / {a=substr($0, 5, length-8); next} {print a":"$0}'
tail -F /var/log/httpd/access.log /var/log/httpd/error.log |awk '/^==> / {a=substr($0, 5, length-8); next} {print a":"$0}'

0 comments on commit 4808f96

Please sign in to comment.