chore: Add WordPress Nginx config map and service infrastructure
This commit is contained in:
committed by
Your Name (aider)
parent
bcd1f4b9b2
commit
084ee9131e
39
virtualinsanity/virtualinsanity-nginx-conf-cm.yaml
Normal file
39
virtualinsanity/virtualinsanity-nginx-conf-cm.yaml
Normal 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;
|
||||
14
virtualinsanity/virtualinsanity-wordpress-svc.yaml
Normal file
14
virtualinsanity/virtualinsanity-wordpress-svc.yaml
Normal 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
|
||||
Reference in New Issue
Block a user