Bare minimum setup for public exposing your server apps running on ports that are not 80 or 443.
Let’s assume we have some app running on localhost:8080 and we want to expose it to public using our domain example.com:
<VirtualHost *:80>
ServerName example.com
ProxyRequests Off
ProxyPreserveHost On
AllowEncodedSlashes NoDecode
<Proxy http://localhost:8080/>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://localhost:8080/ nocanon
ProxyPassReverse / http://localhost:8080/
ProxyPassReverse / http://example.com
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>