jetty 服务器拒绝来自 127.0.0.1 的连接

发布于 2024-10-07 05:47:10 字数 1091 浏览 0 评论 0原文

不确定这里到底发生了什么,但是我通过 maven 插件运行的本地 jetty 服务器,如下所示:

        <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
            <version>${org.mortbay.jetty.version}</version>
            <configuration>
                <systemProperties>
                    <systemProperty>
                        <name>webapp.env.name</name>
                        <value>local</value>
                    </systemProperty>
                </systemProperties>
                <stopPort>8080</stopPort>
                <stopKey>foo</stopKey>
            </configuration>
        </plugin>

... 拒绝来自 127.0.0.1 的所有连接...

例如,如果我运行 curl 'http://localhost:8080' 我得到一个有效的 html 响应,指向我的 webapp 目录的内容。但是 curl 'http://127.0.0.1:8080' 返回 curl: (52) Empty returned from server。有谁知道我如何正确配置码头以接受此类连接?这使我们开发团队的本地配置变得相当复杂。

谢谢!

Not sure what's going on here exactly, but my local jetty server that I'm running via the maven plugin, as in:

        <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
            <version>${org.mortbay.jetty.version}</version>
            <configuration>
                <systemProperties>
                    <systemProperty>
                        <name>webapp.env.name</name>
                        <value>local</value>
                    </systemProperty>
                </systemProperties>
                <stopPort>8080</stopPort>
                <stopKey>foo</stopKey>
            </configuration>
        </plugin>

... is refusing all connections from 127.0.0.1...

For instance, if I run curl 'http://localhost:8080' I get a valid html response pointing at the contents of my webapp directory. But curl 'http://127.0.0.1:8080' returns curl: (52) Empty reply from server. Does anyone out there know how I might configure jetty properly to accept such connections? This is complicating our dev team's local configurations quite a bit.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文