HUB
Sign inSign up
apache logo

felipederodrigues/apache

By felipederodrigues

•Updated almost 10 years ago

Apache configurado para Redmine com URL Relativa

Image
1

289

felipederodrigues/apache repository overview

⁠Descrição

Ubuntu 14.04 com o apache instalado.

Configuração básica para uso de proxy reverso também já criada.

⁠Como foi criada essa img ?

⁠[Dockerfile]

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.:

⁠[redmine.conf]

<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>

⁠Como utilizar ?

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.

⁠Restart Apache:

docker exec -ti apache service apache2 restart
Tag summary
Recent tags
Content type
Image
Digest
Size
89.9 MB
Last updated
almost 10 years ago
docker pull felipederodrigues/apache:v1