Redirect through Apache port

0

My question is the following, as I do when I came to a request for the endenreço: link Redirect to link

and when you go to the address:
link Redirect to link


In other words, I want to do a port redirection. Home The system I am using is Ubuntu Server 16.04 and Apache2 is installed.

    
asked by anonymous 20.01.2018 / 19:26

1 answer

0

For each port, you need to create a different VirtualHost in your Apache :

VirtualHost01

<VirtualHost *:9595>
    ServerAdmin [email protected]
    ServerName test01.com
    ServerAlias www.test01.com
    DocumentRoot /var/www/test01.com/public_html
    ErrorLog ${APACHE_LOG_DIR}/error_test01.log
    CustomLog ${APACHE_LOG_DIR}/access_test01.log combined
</VirtualHost>

VirtualHost02

<VirtualHost *:9696>
    ServerAdmin [email protected]
    ServerName test02.com
    ServerAlias www.test02.com
    DocumentRoot /var/www/test02.com/public_html
    ErrorLog ${APACHE_LOG_DIR}/error_test02.log
    CustomLog ${APACHE_LOG_DIR}/access_test02.log combined
</VirtualHost>
    
22.01.2018 / 12:51