简体   繁体   中英

Apache HTTP Server reverse proxying from port 80 to port *

I have a Suse Linux server with a web application listening on Port 51058. I want now to use Apache HTTP Server to forward the user from port 80 to this port so that when the user types the url in the Browser the user sees the application on port 51058. I do not want to use redirection because i must open then also the port 51058. Is it possible to do something like this with Apache HTTP Server? If yes how can I do this?

You will need to setup a reverse proxy with Apache using the mod_proxy module. You may use something like this a Virtual Host for port 80:

<VirtualHost *:80>
    ServerName MyServerHostName

    ProxyPreserveHost On
    ProxyRequests Off
    ProxyPass / http://localhost:51058/
    ProxyPassReverse / http://localhost:51058/

</VirtualHost>

Here I assume that 51058 is a non-secure(HTTP) port.

您可以将侦听端口从51058更改为80,并将虚拟主机配置为使用端口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