我如何将端口8080隐藏在地址栏中?当我调用我的sub.domain.com时,我什么也得不到,但是当我调用我的sub.domain.com:8008时,我得到了应用程序!我使用的是apache2和JBoss7
谢谢
<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>发布于 2014-07-08 11:09:19
您可以在该子域上设置一个重定向到正确的地址,例如。如果您使用PHP,就可以使用以下代码:
<?php
header('Location: http://<youraddress>:<port>');
?>但是,这实际上会改变地址栏中的地址,所以如果对URL来说它是一种修饰性的东西,那就不是最好的选择。
https://serverfault.com/questions/610900
复制相似问题