Apache how to redirect port?

Asked

Viewed 2,112 times

4

How do I redirect my standard apache website which is at port 80 to a web service at port 8080?

Utilizo Centos 7

1 answer

2

Using the ProxyPass module mod_proxy.

In the example below, everything arriving at port 80 will be redirected to the application available at 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> 

Further explanation in the documentation officer.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.