jetty 服务器拒绝来自 127.0.0.1 的连接
不确定这里到底发生了什么,但是我通过 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论