What happened?
The nginx plugin's service currently fails to start, as it cannot find the mime.types file:
2026/07/08 23:15:04 [emerg] 1582584#1582584: open() "/tmp/testnginx/devbox.d/nginx/mime.types" failed (2: No such file or directory) in /tmp/testnginx/devbox.d/nginx/nginx.conf:6
Background
nginx has a -p flag meaning "Set the prefix path". Devbox's nginx plugin runs nginx -p $NGINX_PATH_PREFIX (i.e. {{ .Virtenv }} / .devbox/virtenv/nginx), which causes error.log to go to the correct place.
What changed
A recent change #2844 added a include mime.types; directive to nginx.conf, and added $NGINX_PATH_PREFIX/mime.types file (.devbox/virtenv/nginx/mime.types). This location was picked under the reasonable but incorrect belief that nginx -p $NGINX_PATH_PREFIX means include mime.types; would be resolved to the -p path.
In fact nginx only seems to use -p path for runtime paths (error_log, access_log, root etc). At configuration time, paths are relative to nginx.conf.
Steps to reproduce
mkdir /tmp/testnginx
cd /tmp/testnginx
devbox init
devbox add nginx
devbox services up -b
tail -1 .devbox/virtenv/nginx/error.log
devbox services down
nginx is failing with:
2026/07/08 23:15:04 [emerg] 1582584#1582584: open() "/tmp/testnginx/devbox.d/nginx/mime.types" failed (2: No such file or directory) in /tmp/testnginx/devbox.d/nginx/nginx.conf:6
Command
services
devbox.json
Devbox version
0.17.5
Nix version
nix (Nix) 2.34.6
What system does this bug occur on?
Linux (x86-64)
Debug logs
No response
What happened?
The nginx plugin's service currently fails to start, as it cannot find the
mime.typesfile:Background
nginx has a
-pflag meaning "Set the prefix path". Devbox's nginx plugin runsnginx -p $NGINX_PATH_PREFIX(i.e.{{ .Virtenv }}/.devbox/virtenv/nginx), which causeserror.logto go to the correct place.What changed
A recent change #2844 added a
include mime.types;directive to nginx.conf, and added$NGINX_PATH_PREFIX/mime.typesfile (.devbox/virtenv/nginx/mime.types). This location was picked under the reasonable but incorrect belief thatnginx -p $NGINX_PATH_PREFIXmeansinclude mime.types;would be resolved to the-ppath.In fact nginx only seems to use
-ppath for runtime paths (error_log,access_log,rootetc). At configuration time, paths are relative tonginx.conf.Steps to reproduce
mkdir /tmp/testnginx cd /tmp/testnginx devbox init devbox add nginx devbox services up -b tail -1 .devbox/virtenv/nginx/error.log devbox services downnginx is failing with:
Command
services
devbox.json
Devbox version
0.17.5
Nix version
nix (Nix) 2.34.6
What system does this bug occur on?
Linux (x86-64)
Debug logs
No response