nginx使用报错nginx: [emerg] invalid number of arguments in “root“ directive in /conf/nginx.conf:57

PS C:\Users\pactera\Desktop\nginx-1.17.5> .\nginx.exe -s reload                                                        

nginx: [emerg] invalid number of arguments in "root" directive in C:\Users\pactera\Desktop\nginx-1.17.5/conf/nginx.conf:57

location /etl {
#        root   /usr/local/springcloud/web/schedule***-html;
         root   D:\\soft\\config-file\\schedule***-html;
         index  index.html;
#         absolute_redirect off;
        }

经查是因为在root后面对应的行后面没有使用;导致

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
这个误的原因是在nginx配置文件中的proxy_pass指令中,参数数量不正确。误提示是"invalid number of arguments in "proxy_pass" directive"。在你提供的引用内容中,有几个解决方案是针对类似的误而提供的。 首先,根据引用,误可能是由于在proxy_pass属性中的地址配置中使用了误的符号。正确的符号应该是冒号(:),而不是分号(;)。确认一下你的配置文件中是否使用了正确的符号。 另外,根据引用,误可能是由于缺少了分号。在你的配置文件中,你需要确保在proxy_pass指令的末尾添加一个分号,以确保参数的正确性。 综上所述,你需要检查你的配置文件中的proxy_pass指令,确保参数数量正确,并使用正确的符号。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [invalid number of arguments in “proxy_pass“ directive in /usr/local/nginx/conf/nginx.conf:46](https://blog.csdn.net/m0_46405589/article/details/114535632)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [Nginx反向代理proxy_cache_path directive is not allowed误解决方法](https://download.csdn.net/download/weixin_38674763/14096007)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [nginx: [emerg] invalid number of arguments in “proxy_pass“ directive in /usr/local/nginx/conf](https://blog.csdn.net/u010227042/article/details/118735758)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值