nginx first

This commit is contained in:
whaffman 2025-05-19 13:21:23 +02:00
parent 81ddf62aec
commit edf43ac9c5
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,7 @@
FROM alpine:3.20
RUN apk add --no-cache \
nginx \
rm -rf /var/cache/apk/*
COPY

View File

@ -0,0 +1,20 @@
server {
listen 80;
server_name ${DOMAIN_NAME};
root /var/www/html/wordpress;
access_log /var/log/nginx/example.${DOMAIN_NAME}-access.log;
error_log /var/log/nginx/example.${DOMAIN_NAME}-error.log error;
index index.html index.htm index.php;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass wordpress:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
}