最近因为工作上的原因,鼓捣着搞JBOSS,上网找了一篇向导,先装JDK,再装ANT,XDOCLET,JBOSS也好了,可是因为服务器上还跑了APACHE,正好占用了8080端口, 在JBOSS目录下找到WEB 服务器配置XML即JBOSS_HOME/server/default/deploy/jboss-web.deployer/server.xml,把Connector的port值改成8088后,可以通过与APACHE并存了。不过在浏览器中总是返回错误请求。按向导提示,在服务器上用WGET能访问localhost或127.0.0.1,访问真实地址还是不行。看来还须在这个XML配置文件中做文章,难道jboss.bind.address变量不行?带着这个疑惑到网上搜索答案,果不其然,JBOSS经验者说需要改成0.0.0.0即可。改动如下:
原内容:
<Connector port="8080" address="${jboss.bind.address}"
maxThreads="250" maxHttpHeaderSize="8192"
emptySessionPath="true" protocol="HTTP/1.1"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
->
<Connector port="8080" address="${jboss.bind.address}"
maxThreads="250" maxHttpHeaderSize="8192"
emptySessionPath="true" protocol="HTTP/1.1"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
->
改后内容:
<Connector port="8088" address="0.0.0.0"
maxThreads="250" maxHttpHeaderSize="8192"
emptySessionPath="true" protocol="HTTP/1.1"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
<Connector port="8088" address="0.0.0.0"
maxThreads="250" maxHttpHeaderSize="8192"
emptySessionPath="true" protocol="HTTP/1.1"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
本文转自 dannyy1026 51CTO博客,原文链接:
http://blog.51cto.com/dannyyuan/95332