“服务”ruby gem和Apache服务器的问题

时间:2023-02-02 00:18:26

I host the same application to 2 difference serves (Serve: localhost:4000 and Apache:localhost:80):

我将相同的应用程序托管到2个差异服务器(服务:localhost:4000和Apache:localhost:80):

Here is the index.html source:

这是index.html来源:

<html>
<head>
    <title></title>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <script type="text/javascript" language="JavaScript">
            var url = "http://shadow01.yumenetworks.com/dynamic_preroll_playlist.xml?domain=1552YmmwFStw";
            var successFn = function (data) {
                console.log(data);
            };
            $.get(url, successFn);
    </script>
</head>
<body>
Hello
</body>
</html>>

And then I those servers one by one, and check the console log. The Apache:localhost:80 return data, but the Serve: localhost:4000 return empty Data.

然后我逐个检查这些服务器,并检查控制台日志。 Apache:localhost:80返回数据,但Serve:localhost:4000返回空数据。

Please help me know why?

请帮帮我,为什么?

Thanks and Regards

感谢致敬

1 个解决方案

#1


0  

Change localhost:4000 to your_ip:4000 will work, look like your service detected your host is localhost so it does not return anything, this may be a security setting on server :)

将localhost:4000更改为your_ip:4000将起作用,看起来您的服务检测到您的主机是localhost所以它不会返回任何内容,这可能是服务器上的安全设置:)

#1


0  

Change localhost:4000 to your_ip:4000 will work, look like your service detected your host is localhost so it does not return anything, this may be a security setting on server :)

将localhost:4000更改为your_ip:4000将起作用,看起来您的服务检测到您的主机是localhost所以它不会返回任何内容,这可能是服务器上的安全设置:)