网站正在端口8080上工作,但不在根目录“ /”上工作

时间:2018-09-03 13:11:48

标签: node.js nginx server centos7 digital-ocean

我的网站正在使用域名test.in:8080,但不能使用test.in。 以下是我的nginx.conf文件。

For Each el In IE.Document.getElementsByTagName("link")
    If el.hasAttribute("link") Then
        // do something with this element
    End If
Next

它也可以在IP地址:8080上使用,但不能在“ digitaloceantwo.25o2.in”上使用。

2 个答案:

答案 0 :(得分:0)

使用https://nginxconfig.io/帮助您获取配置文件

您只需要一个简单的反向代理

答案 1 :(得分:0)

尝试将它们添加到根目录/ usr / share / nginx / html;

index index.html;
location / {
      try_files $uri /index.html;
    }

然后运行:

- nginx -t (if it is ok), run :
-service nginx reload
-service nginx restart