nginx服务器块属性 ‘root’ 用于REST API。

huangapple go评论54阅读模式
英文:

nginx server block property 'root' for rest api

问题

Here's the translated content:

你好,我在AWS EC2上托管了一个NodeJs RESTAPI。
我的nginx服务器配置如下:

nginx服务器块属性 ‘root’ 用于REST API。

这在nginx错误日志中给了我一个警告。

> [warn] 5495#0: 服务器名称“/usr/share/nginx/html”在/etc/nginx/nginx.conf:42中包含可疑符号。

这是一个RESTapi,所以root /usr/share/nginx/html;与此无关。但如果我删除这行,nginx就无法工作。

我该如何摆脱这个错误?

任何帮助都会有所帮助!

英文:

Hi I've host a NodeJs RESTAPI on AWS EC2.
My nginx server block is like this

nginx服务器块属性 ‘root’ 用于REST API。

This gives me a warning in the nginx error logs.

> [warn] 5495#0: server name "/usr/share/nginx/html" has suspicious
> symbols in /etc/nginx/nginx.conf:42

This is a RESTapi so root /usr/share/nginx/html; is ireleavant to this. But if I remove this line. nginx doesn't works.

How do I get rid of this error?

Any help!

答案1

得分: 3

看起来你在server_name值之后没有分号;

英文:

Looks like you don't have semicolon ; after server_name value

huangapple
  • 本文由 发表于 2020年1月7日 00:49:18
  • 转载请务必保留本文链接:https://go.coder-hub.com/59615954.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定