diff --git a/Proxy-Cache/caching-pod.yaml b/Proxy-Cache/caching-pod.yaml index 411b83d..da09b49 100644 --- a/Proxy-Cache/caching-pod.yaml +++ b/Proxy-Cache/caching-pod.yaml @@ -24,7 +24,8 @@ spec: - name: tmpfscache mountPath: /cache - name: nginxconfig - mountPath: /etc/nginx + mountPath: /etc/nginx/nginx.conf + subPath: nginx.conf readOnly: true volumes: - name: tmpfscache diff --git a/Proxy-Cache/cfgmap.yaml b/Proxy-Cache/cfgmap.yaml index ac57271..09a4262 100644 --- a/Proxy-Cache/cfgmap.yaml +++ b/Proxy-Cache/cfgmap.yaml @@ -4,7 +4,27 @@ metadata: name: mirror-proxy-cfg data: nginx.conf: | + user nginx; + worker_processes auto; + + error_log /var/log/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/log/nginx/access.log main; + + sendfile on; # Define caching path and zone proxy_cache_path /cache levels=1:2 keys_zone=my_cache:10m max_size=10g inactive=60m;