updated nginx config
This commit is contained in:
@@ -43,6 +43,42 @@ data:
|
||||
}
|
||||
---
|
||||
# ===================
|
||||
# NGINX CONFIG FOR CLEAN URLs
|
||||
# ===================
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: nginx-config
|
||||
namespace: felhom-system
|
||||
data:
|
||||
default.conf: |
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# Enable clean URLs - serve .html files without extension
|
||||
location / {
|
||||
try_files $uri $uri.html $uri/ =404;
|
||||
}
|
||||
|
||||
# Cache static assets
|
||||
location ~* \.(css|js|png|jpg|jpeg|gif|ico|svg|woff|woff2)$ {
|
||||
expires 7d;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
# Security headers
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
|
||||
# Error pages
|
||||
error_page 404 /404.html;
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
}
|
||||
---
|
||||
# ===================
|
||||
# FILEBROWSER
|
||||
# ===================
|
||||
apiVersion: apps/v1
|
||||
@@ -171,6 +207,9 @@ spec:
|
||||
volumeMounts:
|
||||
- name: website-content
|
||||
mountPath: /usr/share/nginx/html
|
||||
- name: nginx-config
|
||||
mountPath: /etc/nginx/conf.d/default.conf
|
||||
subPath: default.conf
|
||||
resources:
|
||||
requests:
|
||||
memory: "32Mi"
|
||||
@@ -194,6 +233,9 @@ spec:
|
||||
- name: website-content
|
||||
persistentVolumeClaim:
|
||||
claimName: felhom-website-content
|
||||
- name: nginx-config
|
||||
configMap:
|
||||
name: nginx-config
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
||||
Reference in New Issue
Block a user