mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 01:12:40 +08:00
Simplified code about duplicate root/alias directive.
This commit is contained in:
parent
abc9d62b03
commit
e81ad21fea
@ -4405,16 +4405,14 @@ ngx_http_core_root(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
if (clcf->root.data) {
|
||||
|
||||
if ((clcf->alias != 0) == alias) {
|
||||
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
|
||||
"\"%V\" directive is duplicate",
|
||||
&cmd->name);
|
||||
} else {
|
||||
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
|
||||
"\"%V\" directive is duplicate, "
|
||||
"\"%s\" directive was specified earlier",
|
||||
&cmd->name, clcf->alias ? "alias" : "root");
|
||||
return "is duplicate";
|
||||
}
|
||||
|
||||
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
|
||||
"\"%V\" directive is duplicate, "
|
||||
"\"%s\" directive was specified earlier",
|
||||
&cmd->name, clcf->alias ? "alias" : "root");
|
||||
|
||||
return NGX_CONF_ERROR;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user