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
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
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 .