vHost use apache2 from ip:port to ip

Mario tsai
Nov 13, 2023

--

Like 123.123.123.123:58080 to 123.123.123.123

IN Ubuntu

sudo vim /etc/apache2/sites-available/000-default.conf

Copy and paste

<VirtualHost *:80>    
ServerName localhost
ProxyPreserveHost On
ProxyRequests off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass / http://localhost:58080/
ProxyPassReverse / http://localhost:58080/

</VirtualHost>

sudo systemctl restart apache2

Done!

--

--

Mario tsai

Major in physical education. Football referee. And high interest in looking the world through the numbers.