Core: working_directory relative to prefix

Previously, a relative path was resolved against the current working
directory of the master process, which depends on how nginx is started.
Now it is resolved relative to prefix, similar to pid and error_log.
This commit is contained in:
Sergey Kandaurov committed 2026-10-21 11:48:28 +04:00
1 parent b38c9d8068
commit 0e20f1fb0f
1 file changed
+7
+7
View File
@@ -1231,6 +1231,13 @@ ngx_core_module_init_conf(ngx_cycle_t *cycle, void *conf)
NGX_OLDPID_EXT, sizeof(NGX_OLDPID_EXT));
if (ccf->working_directory.len) {
if (ngx_conf_full_name(cycle, &ccf->working_directory, 0) != NGX_OK) {
return NGX_CONF_ERROR;
}
}
#if !(NGX_WIN32)
if (ccf->user == (uid_t) NGX_CONF_UNSET_UINT && geteuid() == 0) {