0

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

1 Answer 1

0

https://stackoverflow.com/questions/8541182/apache-redirect-to-another-port

Still answered here, or replace with nginx and listen on server specific name only.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .