chore: Add WordPress Nginx config map and service infrastructure

This commit is contained in:
Your Name
2026-01-17 22:45:35 +01:00
committed by Your Name (aider)
parent bcd1f4b9b2
commit 084ee9131e
2 changed files with 53 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: virtualinsanity-nginx-conf
namespace: wordpress
data:
default.conf: |
server {
listen 80;
server_name virtualinsanity.giaco.net;
root /var/www/html;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass wordpress:9000; # Assumes 'wordpress' is the container name in the same pod
location ~ /\.ht {
deny all;
}
}
location ~* /(wp-config\.php|readme\.html|license\.txt) {
deny all;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
expires 1y;
log_not_found off;
access_log off;
}
error_page 404 /index.php;

View File

@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: virtualinsanity-wordpress-svc
namespace: wordpress
spec:
selector:
app: wordpress
site: virtualinsanity
ports:
- protocol: TCP
port: 80
targetPort: 80
type: ClusterIP