Files
yourls/templates/configmap.yaml

56 lines
1.4 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "yourls-nginx.fullname" . }}-nginx-config
labels:
{{- include "yourls-nginx.labels" . | nindent 4 }}
data:
default.conf: |
upstream php-fpm {
server localhost:9000;
}
server {
listen 80;
server_name _;
root /var/www/html;
index index.php index.html;
client_max_body_size 100M;
location / {
try_files $uri $uri/ /yourls-loader.php$is_args$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php-fpm;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_buffering off;
fastcgi_read_timeout 300;
}
location ~ /\.ht {
deny all;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
log_not_found off;
access_log off;
allow all;
}
location ~* \.(css|gif|ico|jpeg|jpg|js|png|svg|woff|woff2|ttf|eot)$ {
expires max;
log_not_found off;
}
}