40 lines
1.0 KiB
YAML
40 lines
1.0 KiB
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
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;
|
|
|
|
server {
|
|
# ...
|
|
location / {
|
|
proxy_cache my_cache;
|
|
proxy_pass http://mirror.0xem.ma; # Replace with your actual upstream server
|
|
}
|
|
}
|
|
}
|
|
|