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:
publish
container onport 8
0, requires docker host haveport 80
free port.use
nginx
on port 80 ,reverse prox
y apache container runs on port 8080.
Comments
Post a Comment