k8s ingress-nginx 支持PHP
【代码】k8s ingress-nginx 支持PHP。
·
apiVersion: v1
kind: ConfigMap
metadata:
name: economy-master-internal-prod
namespace: default
data:
DOCUMENT_ROOT: $document_root
SCRIPT_FILENAME: "/home/services/htdocs/Website/public/$fastcgi_script_name"
REQUEST_METHOD: $request_method
CONTENT_TYPE: $content_type
QUERY_STRING: $query_string
CONTENT_LENGTH: $content_length
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: economy-master-internal-prod
namespace: default
annotations:
nginx.ingress.kubernetes.io/backend-protocol: "FCGI"
nginx.ingress.kubernetes.io/fastcgi-index: "index.php"
nginx.ingress.kubernetes.io/fastcgi-params-configmap: "economy-master-internal-prod"
nginx.ingress.kubernetes.io/fastcgi_buffers: "64 128k"
nginx.ingress.kubernetes.io/fastcgi_buffer_size: "128k"
nginx.ingress.kubernetes.io/proxy-body-size: "200m"
nginx.ingress.kubernetes.io/upstream-hash-by: $remote_addr
nginx.ingress.kubernetes.io/configuration-snippet: |
access_log syslog:server=10.140.102.197:1516,facility=local7,severity=debug,tag=economy_internal_prod new_transfer;
error_log /var/log/nginx/economy.int-inc.com.error.log;
rewrite ^(.+)$ /index.php?s=$1 break;
spec:
ingressClassName: ingress-prod-nginx1
rules:
- host: economy.int-inc.com
http:
paths:
- pathType: Prefix
backend:
service:
name: economy-master-internal-prod
port:
number: 9000
path: /
更多推荐
已为社区贡献16条内容
所有评论(0)