skip to Main Content

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?

2

Answers


  1. You can change the Listen port from 51058 to 80 and configure the Virtual host to use port 80

    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search