Skip to content

Commit 7a3c5f5

Browse files
committed
logging
1 parent d96029e commit 7a3c5f5

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

src/BenchmarksApps/TLS/Nginx/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
FROM nginx:latest
22

3+
# Define build argument
4+
ARG SSL_LOGGING_ENABLED=false
5+
6+
# Set environment variable from ARG
7+
ENV SSL_LOGGING_ENABLED=${SSL_LOGGING_ENABLED}
8+
39
# Copy configuration and SSL certificates
410
COPY config/nginx.conf /etc/nginx/nginx.conf
511
COPY config/cert.pem /etc/nginx/certs/cert.pem

src/BenchmarksApps/TLS/Nginx/config/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ http {
77
'"$http_user_agent" "$http_x_forwarded_for" '
88
'[$ssl_protocol] [$ssl_cipher]';
99

10-
access_log /var/log/nginx/access.log ssl_logs;
10+
access_log /var/log/nginx/access.log ssl_logs if=$SSL_LOGGING_ENABLED;
1111

1212
server {
1313
listen 8080 ssl;
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#!/bin/bash
2-
# Log the application start to stdout
3-
echo "$(date) - Application started."
4-
5-
# Start Nginx
6-
nginx -g "daemon off;"
2+
export SSL_LOGGING_ENABLED=${SSL_LOGGING_ENABLED}
3+
echo "$(date) - Application started. Logging: $LOGGING"
4+
nginx -g "daemon off;" # start nginx

0 commit comments

Comments
 (0)