apache - Docker and apache2, remove port from url -


i'm working docker on ubuntu server, , have apache2 container.

this container working, if go http://my-server-ip:8080, can see folders , files in folder /var/www/html of apache2 container.

/var/www/html in container linked folder /home/me on machine. work directly in /home/me.

now need add virtualhost redirect subdomain specific folder /var/www/html/portfolio.

so connect container , add new host :

<virtualhost *:80>     serveradmin webmaster@localhost     documentroot /var/www/html/portfolio     servername my.subdomain.com     serveralias my.subdomain.com </virtualhost> 

the result when go my.subdomain.com:8080 it's ok, can read content of /var/www/html/portfolio, question :

how can remove :8080 in url ?

you have 2 options:

  1. publish container on port 80, requires docker host have port 80 free port.

  2. use nginx on port 80 , reverse proxy apache container runs on port 8080.


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -