tools/stx/toCOPY/aptly/nginx.conf
Haiqing Bai d9bcb8b10e aptly docker: change nginx log files to /var/aptly
The original log files of nginx are under '/var/log/nginx/'
which is not in local disk and it hard to collect these logs.
This commit changed these logs to the shared volume 'var/aptly'
of aptly docker.

Test Plan:
Pass: Create a new build environment and check with:
      $stx control enter --dockername repomgr
      $cat /var/aptly/nginx_error.log
      $cat /var/aptly/nginx_access.log
      exit from the repomgr:
      $cd ${STX_BUILD_HOME}
      $cat aptly/nginx_error.log
      $cat aptly/nginx_access.log
      nginx works and it logs into the above files

Story: 2008846
Task: 46647

Signed-off-by: Haiqing Bai <haiqing.bai@windriver.com>
Change-Id: Ibeeb7e1c2b98c3a5d8a78acd5bb269b45550589c
2022-10-26 10:14:35 +08:00

33 lines
651 B
Nginx Configuration File

user nginx;
worker_processes auto;
error_log /var/aptly/nginx_error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/aptly/nginx_access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 0;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}