How to hide my website port number on website url

寵の児 提交于 2019-12-02 03:04:50

问题


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

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

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

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

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


回答1:


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.




回答2:


If you don't want a port number in your URL, you have to use the default port number for HTTP, which is 80. If it's anything other than 80, you will be required to put the port number in the URL. That's all there is to it.

Now, if your question is "how do I host my Tomcat website on port 80", well there are plenty of answers to that question both on SA and teh intertubes. Just search.



来源:https://stackoverflow.com/questions/19189224/how-to-hide-my-website-port-number-on-website-url

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!