Description
ingress配置如下双向认证无效了。 还有 ingress指定配置 nginx.ingress.kubernetes.io/server-snippet: 也无效了。例如:
kind: Ingress
metadata:
name: log
namespace: default
annotations:
nginx.ingress.kubernetes.io/auth-tls-verify-client: "on"
nginx.ingress.kubernetes.io/auth-tls-secret: "default/ca-secret"
nginx.ingress.kubernetes.io/auth-tls-verify-depth: "1"
====
nginx.ingress.kubernetes.io/server-snippet: |
add_header nginxingress 888;
gzip_static on;
gzip_proxied expired no-cache no-store private auth;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 9;
gzip_types text/plain application/javascript text/css application/xml text/javascript application/json font/woff image/jpeg image/gif image/png;
gzip_vary on;
@drawing 请帮忙给出https双向认证的配置写法,以及指定nginx.conf server位置的写法哈。或者指定 配置前端html指定目录也行
.另外configmap 加入 tengine-reload: 'true' ,tengine-static-service-cfg: 'true' 后 容器日志显示 duplicate location "/robots.txt"
Error: exit status 1
2023/08/06 18:56:19 [warn] 857#857: protocol options redefined for 0.0.0.0:443 in /tmp/nginx-cfg2360560639:2760
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /tmp/nginx-cfg2360560639:2760
2023/08/06 18:56:19 [warn] 857#857: protocol options redefined for [::]:443 in /tmp/nginx-cfg2360560639:2761
nginx: [warn] protocol options redefined for [::]:443 in /tmp/nginx-cfg2360560639:2761
2023/08/06 18:56:19 [emerg] 857#857: duplicate location "/robots.txt" in /tmp/nginx-cfg2360560639:894
nginx: [emerg] duplicate location "/robots.txt" in /tmp/nginx-cfg2360560639:894
nginx: configuration file /tmp/nginx-cfg2360560639 test failed