Apache how to redirect port?

4

How do I redirect my default Apache web site that is on port 80 to a web service on port 8080?

I use CentOS 7

    
asked by anonymous 25.05.2017 / 16:33

1 answer

2

Using ProxyPass module mod_proxy . Home In the example below, everything that arrives on port 80 will be redirected to the available application in http://localhost:8080/app :

<VirtualHost *:80> 
  ProxyPreserveHost On
  ProxyRequests Off
  ServerName dominio.com.br
  ServerAlias dominio.com.br
  ProxyPass http://dominio.com.br http://localhost:8080/app
  ProxyPassReverse http://dominio.com.br http://localhost:8080/app
</VirtualHost> 

More explanation in official documentation .

    
25.05.2017 / 16:41