2014-07-07 138 views
0

如何從地址欄中隱藏端口8080? 當我打電話給我的sub.domain.com我什麼都沒有,但是當我打電話給我的sub.domain.com:8008我得到的應用程序! 我使用的Apache2和JBoss 7如何隱藏端口8080?

感謝

<virtualhost *:80> 
ServerName sub.domain.com 
ServerAlias sub.domain.com 
<Location /myapp> 
      Order deny,allow 
      Allow from all 
      Options -Indexes FollowSymLinks 
      ProxyPass http://127.0.0.1:8080/myapp 
      ProxyPassReverse http://127.0.0.1:8080/myapp 
</Location> 
DirectoryIndex index.html index.htm index.php index.asp index.aspx index.jsp index.jspa index.shtml index.shtm 
</virtualhost> 

回答

0

您可以隱藏地址欄的端口,嘗試使用端口80來啓動服務器,您可以更改stanalone.xml文件

啓用站點-
<socket-binding name="http" port="80"/> 
+0

它是默認端口,當嘗試訪問url時不帶端口號,它會自動取端口號80 – Ramaraj

+0

Apache使用此端口 – user3764526

1

只是複製和過去的這個配置你的

<VirtualHost *:80> 
    ProxyPreserveHost On 

    # Servers to proxy the connection, or; 
    # List of application servers: 
    # Usage: 
    # ProxyPass/http://[IP Addr.]:[port]/ 
    # ProxyPassReverse/http://[IP Addr.]:[port]/ 
    # Example: 
    ProxyPass/http://0.0.0.0:8080/ 
    ProxyPassReverse/http://0.0.0.0:8080/ 

    ServerName localhost 
</VirtualHost>