如何在网站 url 上隐藏我的网站端口号 [英] How to hide my website port number on website url

查看:16
本文介绍了如何在网站 url 上隐藏我的网站端口号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站是用JAVA实现的.所以我们拿了 VPS 并安装了 Tomcat 然后部署我的网站是这样出现的

My website has implemented by using JAVA. So we have taken VPS and installed Tomcat then deployed My website is appearing like this

每当我在 url 中点击 www.mysite.com 时......它会出现如下.

whenever I click www.mysite.com in url ... it is appearing as below.

http://mysite.com:8080/foldername/

但我希望将我的网站显示为 www.mysite.com

But I would like to see my website as www.mysite.com

任何人都可以建议我做什么..我应该对 htaccess 文件做任何更改吗?

Can any one suggest me what to do .. should I do any changes in htaccess file ?

推荐答案

如果您没有在 URL 中提供端口号,您的 HTTP 请求将被发送到端口 80.您可以设置防火墙规则来重定向请求头端口 80 到 8080.

If you don't provide the port number in the URL your HTTP requests would be sent to port 80. You can set up a firewall rule to redirect requests headed towards port 80 to 8080.

这篇关于如何在网站 url 上隐藏我的网站端口号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆