Repository navigation
Recreate /tmp/nginx/body before testing nginx config - #5914
PrassanthVG wants to merge 1 commit into
Conversation
The directory was only created at container start, so if it was removed later every host/certificate save failed with Internal Error. Fixes NginxProxyManager#5895
|
| test: () => { | ||
| debug(logger, "Testing Nginx configuration"); | ||
| // nginx.conf points client_body_temp_path here; it only gets created at container start | ||
| fs.mkdirSync("/tmp/nginx/body", { recursive: true }); |
There was a problem hiding this comment.
Creation error skips config cleanup
If directory creation fails during configure()'s second nginx test—for example, because /tmp/nginx becomes unwritable after the first test—mkdirSync throws before test() returns a promise. The failure handler is never attached, so it cannot mark the newly generated config as invalid or remove it. If that config is invalid, later saves can keep failing even after directory access is restored. Make directory-creation errors reject the promise so the existing cleanup runs.
|
Docker Image for build 1 is available on DockerHub: Note Ensure you backup your NPM instance before testing this image! Especially if there are database changes. Warning Changes and additions to DNS Providers require verification by at least 2 members of the community! |
The directory was only created at container start, so if it was removed later every host/certificate save failed with Internal Error.
Fixes #5895
Why
Fixes #5895. /tmp/nginx/body (client_body_temp_path) is only created at container start. If it is removed later, every nginx test fails and saves return "Internal Error". The directory is now recreated before each nginx config test.
Type of Change
AI Usage