I have a ubuntu server with two docker containers. The first one is running lamp and the second container is running a blog. currently the blog is accessible on mydomain.com:82 (mydomain.com points to the lamp container on port 80 by default). i've created A record for blog.mydomain.com to point to the ip of the server. now how do i forward the traffic from blog.mydomain.com to point to mydomain.com:82 where the blog can be accessed.
solution
i enabled proxy and proxy_http modules in apache, created a new virtual server in apache with the following config
<VirtualHost *:80>
ServerName blog.mydomain.com
ProxyPass / http://mydomain.com:82/
</VirtualHost>
now http://blog.mydomain.com correctly renders content from http://mydomain.com:82 without modifying the url and redirecting