mirror of
https://github.com/nginx/nginx.git
synced 2026-10-24 14:47:45 -05:00
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:
1 parent
b38c9d8068
commit
0e20f1fb0f
1 file changed
+7
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user