报错:nginx: [emerg] “user“ directive is not allowed here in
报错:nginx: [emerg] “user” directive is not allowed here in /alidata/server/nginx-1.11.10/conf/nginx.conf:1。原因:我直接把nginx的主配置目录conf当成了虚拟主机文件的存放目录。
·
报错:nginx: [emerg] “user” directive is not allowed here in /alidata/server/nginx-1.11.10/conf/nginx.conf:1
原因:我直接把nginx的主配置目录conf当成了虚拟主机文件的存放目录
http {
include /alidate/nginx/conf/*.conf; #不要直接把虚拟主机映射到nginx的主配置目录下面
}
真确做法:单独创建nginx虚拟主机文件的存放目录conf.d
# mkdir -p /alidate/nginx/conf/conf.d # 创建虚拟主机文件单独存放目录
http {
include /alidate/nginx/conf/conf.d/*.conf;
}
更多推荐
所有评论(0)