Created
December 5, 2018 19:37
Revisions
-
elieux created this gist
Dec 5, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ FROM ubuntu:18.04 COPY ./apt-wrapper.sh /tmp/apt RUN chmod +x /tmp/apt RUN /tmp/apt install -y --no-install-recommends apache2='2.4.*' RUN a2enmod rewrite RUN a2dissite 000-default RUN sed -e '/^*)/ { n; s/$HTTPD/exec &/; }' -i /usr/sbin/apache2ctl ENTRYPOINT [ "apache2ctl" ] CMD [ "-DFOREGROUND" ] EXPOSE 80 COPY ./default.conf /etc/apache2/sites-available/default.conf RUN a2ensite default RUN rm /var/www/html/index.* COPY ./htaccess /var/www/html/.htaccess COPY ./*.html /var/www/html/ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ #!/bin/sh set -e apt update DEBIAN_FRONTEND=noninteractive apt "$@" apt clean apt autoremove -y rm -rf /var/log/{alternatives.log,apt,dpkg.log} rm -rf /var/cache/apt rm -rf /var/lib/apt/lists This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ <VirtualHost *:80 *:443> ServerName test DocumentRoot "/var/www/html" </VirtualHost> <Directory "/var/www/html/"> Options FollowSymLinks AllowOverride All <FilesMatch "foo"> RewriteEngine On RewriteRule .* - [F] </FilesMatch> </Directory> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ This is default. This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ RewriteEngine on RewriteRule ^(foo|bar)$ /default.html [L] RewriteRule ^baz$ /foobar [L] This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ <a href="bar">bar</a> - should work and does<br/> <a href="foo">foo</a> - should work, but doesn't<br/> <a href="baz">baz</a> - shouldn't work and doesn't<br/>