Compare commits

...

3 Commits

Author SHA1 Message Date
005e2af497 correction to default.conf 2025-01-05 15:20:04 +00:00
5c09ab8657 updated to use router.php from https://phprouter.com/ 2025-01-05 14:55:42 +00:00
a091a52d7b updated to use router.php from https://phprouter.com/ 2025-01-05 14:49:32 +00:00
4 changed files with 50 additions and 12 deletions

View File

@ -1,9 +1,14 @@
To install To install
docker pull git.brynstuff.co.uk/bryn/web:0.01 docker pull git.brynstuff.co.uk/bryn/web:0.02
version history: version history:
---------------------------------------------- ----------------------------------------------
0.02
Alpine/3.21.0
nginx/1.26.2
PHP/8.2.27 (fpn-fcgi)
0.01 0.01
Alpine/3.20.3 Alpine/3.20.3
nginx/1.26.2 nginx/1.26.2

View File

@ -1,7 +1,7 @@
--- ---
services: services:
frontend: frontend:
image: git.brynstuff.co.uk/bryn/web:0.01 image: git.brynstuff.co.uk/bryn/web:0.02
build: . build: .
ports: ports:
- 80:80 - 80:80

View File

@ -216,3 +216,14 @@ Stack trace:
2024/10/12 12:08:01 [notice] 1#1: start worker processes 2024/10/12 12:08:01 [notice] 1#1: start worker processes
2024/10/12 12:08:01 [notice] 1#1: start worker process 11 2024/10/12 12:08:01 [notice] 1#1: start worker process 11
2024/10/12 12:08:01 [notice] 1#1: start worker process 12 2024/10/12 12:08:01 [notice] 1#1: start worker process 12
2024/10/13 14:24:08 [notice] 1#1: signal 15 (SIGTERM) received, exiting
2024/10/13 14:24:08 [notice] 11#11: exiting
2024/10/13 14:24:08 [notice] 11#11: exit
2024/10/13 14:24:08 [notice] 12#12: exiting
2024/10/13 14:24:08 [notice] 12#12: exit
2024/10/13 14:24:08 [notice] 1#1: signal 17 (SIGCHLD) received from 12
2024/10/13 14:24:08 [notice] 1#1: worker process 12 exited with code 0
2024/10/13 14:24:08 [notice] 1#1: signal 29 (SIGIO) received
2024/10/13 14:24:08 [notice] 1#1: signal 17 (SIGCHLD) received from 11
2024/10/13 14:24:08 [notice] 1#1: worker process 11 exited with code 0
2024/10/13 14:24:08 [notice] 1#1: exit

View File

@ -1,16 +1,38 @@
server { server {
index index.php index.html index.htm; index routes.php;
listen 80; listen 80;
listen [::]:80; listen [::]:80;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
}
root /app; root /app;
charset utf-8;
#This is a rewrite rule. It is telling nginx to try to find the file in the root directory. If it can't find it, it will try to find it in the root directory with a trailing slash. If it can't find it there, it will try to find it in the routes.php file.
location / {
try_files $uri $uri/ /routes.php?$query_string;
}
error_page 404 /routes.php;
location routes.php {
}
#This is telling nginx to return a 404 error if it finds a php file.
location ~ \.php {
return 404;
}
location ~ (\.png|\.jpg|\.gif|\.jpeg|\.zip|\.css|\.svg|\.js)$ {
}
location = /routes.php {
try_files $uri /routes.php?$query_string;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index routes.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
server_name bsapi.home.brynstuff.co.uk; server_name bsapi.home.brynstuff.co.uk;
} }