简体   繁体   中英

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

hi guys i wanna ask about apache mod_proxy. really try hard to find how to convert url adress but no result yet. so here is problem.

request URL and service URL: www.mbc.com:10800

i want to show browser adress bar like this 'www.mbc.com'

webserver : linux + apache and virtualhost.

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. To make it vanish you need to use the standard port for your server, ie 80 for http and 443 for https:

<VirtualHost *:80>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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