wwwgmo/helm/templates/php-fpm/configmap-nginx.yaml
2025-02-07 20:52:27 +01:00

38 lines
1.0 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: configmap-nginx
labels:
{{- include "site.labels" . | nindent 4 }}
data:
default.conf: |
server {
index index.php;
root /var/www/html/web;
listen 8080;
server_name _;
charset utf-8;
error_log /dev/stderr;
access_log /dev/stdout;
# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
# Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)
location ~ /\. {
deny all;
}
location / {
index index.php;
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}