How to remove port number from http://localhost:8123 to use as http://localhost? [closed]

安稳与你 提交于 2019-11-28 08:41:10

The only way to do this is to change back to 80, or to install a listener on port 80 (like a proxy) that redirects all your traffic to port 8123.

When you enter a server name without a port, port 80 is assumed by default. AFAIK, there is no way to change this behaviour without changing your browser's source code.

The hosts file does not support the kind of redirection you are trying to do. The rules simply fail.

Edit: ah, it might be possible to change the default port in some browsers. Here's an article in MozillaZine for Firefox.

You can remove it with proxyPass and proxyPassReverse

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