0
votes

Hi I'm a student that's working on a docker project from school.

I have to configure docker with Apache on Ubuntu 16.04. The demand is that I can host multiple applications on one IP with different ports. But I have one problem.... I can't link my urls to the assigned port that I want.

This is my virtual Host file for different containers:

DocumentRoot "/var/www/html" ServerName site1.docker.biz

Allow from localhost

ProxyPass / http://localhost:80/

DocumentRoot /var/www/html ServerName site2.docker.biz

allow from localhost

ProxyPass / http://site2.docker.biz:8080/

When I run this file site2.docker.biz links to site1.docker.biz but that's not what I want. I want to link site2.docker.biz to port 8080 instead of port 80.

Can somebody tell me how to do this.

Thank You and kind regards,

Monkeyspree

1

1 Answers

0
votes

Why dont you just use port mapping in your docker run statement

docker run -p 8080:80