Apache configurado para Redmine com URL Relativa
289
Ubuntu 14.04 com o apache instalado.
Configuração básica para uso de proxy reverso também já criada.
FROM ubuntu:14.04
RUN apt-get update
RUN apt-get install -y apache2 libapache2-mod-proxy-html libxml2-dev
RUN a2enmod proxy
RUN a2enmod proxy_http
RUN a2enmod proxy_ajp
RUN a2enmod rewrite
RUN a2enmod deflate
RUN a2enmod headers
RUN a2enmod proxy_balancer
RUN a2enmod proxy_connect
RUN a2enmod proxy_html
RUN service apache2 start
CMD ["sh", "-c", "service apache2 restart ; /bin/bash"]
Colocar quaisquer arquivos de configuração do Apache em /home/ubuntu/apache. Ex.:
<VirtualHost *:80>
ProxyPass /monitor http://IP_DO_SERVIDOR:3000 nocanon
ProxyPassReverse /monitor http://IP_DO_SERVIDOR:3000
ProxyPass /redmine http://IP_DO_SERVIDOR:81/redmine nocanon
ProxyPassReverse /redmine http://IP_DO_SERVIDOR:81/redmine
ProxyRequests Off
AllowEncodedSlashes NoDecode
<Proxy http://IP_DO_SERVIDOR:81*>
Order deny,allow
Allow from all
</Proxy>
<Proxy http://IP_DO_SERVIDOR:3000*>
Order deny,allow
Allow from all
</Proxy>
</VirtualHost>
mkdir -p /home/ubuntu/apache Copiar arquivo .conf para /home/ubuntu/apache
docker run -ti \
--name apache \
-p 80:80 \
--restart always \
-v /home/ubuntu/apache:/etc/apache2/sites-enabled \
-d felipederodrigues/apache:v1
Acessar o IP_DO_SERVIDOR na porta 80 ou nas urls relativas definidas no arquivo .conf.
docker exec -ti apache service apache2 restart
docker pull felipederodrigues/apache:v1