简体   繁体   English

如何使用Apache mod_proxy隐藏url的端口号?

[英]How to hide url's port number with Apache mod_proxy?

hi guys i wanna ask about apache mod_proxy. 嗨,大家好,我想问一下Apache mod_proxy。 really try hard to find how to convert url adress but no result yet. 确实尝试找到如何转换url地址的方法,但没有结果。 so here is problem. 所以这是问题。

request URL and service URL: www.mbc.com:10800 请求网址和服务网址:www.mbc.com:10800

i want to show browser adress bar like this 'www.mbc.com' 我想显示这样的浏览器地址栏“ www.mbc.com”

webserver : linux + apache and virtualhost. webserver:linux + apache和virtualhost。

httpd.conf httpd.conf

<VirtualHost *:10800>
    ProxyRequests Off
    ProxyPreserveHost On
    SSLEngine on
    <Proxy *>
        Order Deny,Allow
        Allow from all
    </Proxy>
    ProxyPass / https://www.mbc.com:10800/
    ProxyPassReverse / https://www.mbc.com/
</VirtualHost>

this configuration is not working. 此配置无效。 which configuration changed? 哪个配置改变了?

The port is shown in the URL bar if it is not the standard port. 如果该端口不是标准端口,则会显示在URL栏中。 To make it vanish you need to use the standard port for your server, ie 80 for http and 443 for https: 要使其消失,您需要为服务器使用标准端口,即对于HTTP使用80,对于https使用443:

<VirtualHost *:80>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM