Jboss解决只能通过localhost访问不能通过IP访问的错误
2014-10-10 09:32
330 查看
Jboss版本:jboss-as-7.1.1.Final
Jboss安装路径:F:\jboss-as-7.1.1.Final
启动方式:MyEclipse10 server启动
本机IP:192.168.173.85
Jboss监听端口:8080
测试项目名:jfinal-demo
正确访问路径:localhost:8080/jfinal-demo或者127.0.0.1:8080/jfinal-demo
错误访问路径:192.168.173.85:8080/jfinal-demo
原因:
项目访问的路径配置文件中,将访问的IP绑定为本地IP127.0.0.1,
即只可以用localhost和127.0.0.1进行访问,
其他IP无法访问
解决方案:
修改配置文件 standalone.xml
路径: F:\jboss-as-7.1.1.Final\standalone\configuration\standalone.xml
默认配置:
<interfaces> <interface name="management"> <inet-address value="${jboss.bind.address.management:127.0.0.1}"/> </interface> <interface name="public"> <inet-address value="${jboss.bind.address:127.0.0.1}"/> </interface> <interface name="unsecure"> <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/> </interface> </interfaces>
可以2种修改:
方式1.
<interfaces> <interface name="management"> <inet-address value="${jboss.bind.address.management:127.0.0.1}"/> </interface> <interface name="public"> <inet-address value="${jboss.bind.address:0.0.0.0}"/> </interface> <interface name="unsecure"> <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/> </interface> </interfaces>
方式2.
<interfaces> <interface name="management"> <inet-address value="${jboss.bind.address.management:127.0.0.1}"/> </interface> <interface name="public"> <inet-address value="${jboss.bind.address:192.168.173.85}"/> </interface> <interface name="unsecure"> <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/> </interface> </interfaces>
两重方式修改后的不同点:
通过方式1修改后,正确访问路径:localhost:8080/jfinal-demo,127.0.0.1:8080/jfinal-demo,192.168.173.85:8080/jfinal-demo
通过方式2修改后,正确访问路径:192.168.173.85:8080/jfinal-demo,另外两种访问路径是错误的不可以访问
阅读更多相关文章推荐
- jboss 4.2.2只能localhost访问 不能通过ip访问解决办法
- 解决JBoss只能通过localhost访问不能通过IP的问题
- 解决JBoss只能通过localhost(127.0.0.1)而不能通过IP访问
- 解决JBoss只能通过localhost(127.0.0.1)而不能通过IP访问
- 解决mysql中只能通过localhost(127.0.0.1)访问不能通过ip访问的问题
- JBOSS 局域网不能访问,本机也无法通过局域网IP访问,只能用 localhost 或 127.0.0.1
- 解决mysql中只能通过localhost访问不能通过ip访问的问题
- 解决mysql中只能通过localhost访问不能通过ip访问的问题
- Linux下访问Tomcat只能通过localhost,不能通过IP,怎么解决
- 解决mysql中只能通过localhost访问不能通过ip访问的问题
- 【Java-Web】Tomcat启动后,只能通过localhost访问,不能通过本机IP
- 解决Mysql中只能通过localhost登陆不能通过ip登陆的问题
- 解决 LINUX mysql不能通过IP连接 只能localhost 权限没问题情况下
- 解决JBoss不能远程访问只能使用localhost或127.0.0.1在本机访问
- MySql 只能localhost 和 127.0.0.1访问 不能通过其他IP访问
- JBOSS版本:4.2.2GA 无法通过IP访问,或只能通过127.0.0.1访问的问题解决
- 解决Mysql只能用localhost而不能用ip进行访问的问题
- 解决tomcat服务器下,只能通过localhost,而不能通过127.0.0.1或者本地ip地址访问的问题
- 解决tomcat服务器下,只能通过localhost,而不能通过127.0.0.1或者本地ip地址访问的问题
- 解决JBoss不能远程访问只能使用localhost或127.0.0.1在本机访问