Adding so many things.

This commit is contained in:
dan612
2026-03-22 13:23:31 -04:00
parent 7d5904e925
commit b9e362497a
10 changed files with 95 additions and 41 deletions

32
nginx.conf Normal file
View File

@@ -0,0 +1,32 @@
server {
listen 80;
server_name localhost;
# This MUST match the working_dir and volume path from your docker-compose.yml
root /app;
index index.php index.html;
# Using underscores for log files
access_log /var/log/nginx/access_log.log;
error_log /var/log/nginx/error_log.log;
# Route everything to index.php if the file doesn't explicitly exist
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# Pass all .php files to the PHP-FPM container
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# 'php' is the name of the service in your docker-compose.yml
# 9000 is the default port PHP-FPM listens on
fastcgi_pass php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}