Skip to content

Instantly share code, notes, and snippets.

@outrunthewolf
Created October 3, 2013 19:21
Show Gist options
  • Save outrunthewolf/6815535 to your computer and use it in GitHub Desktop.
Save outrunthewolf/6815535 to your computer and use it in GitHub Desktop.
Multiline Dockerfile
...
RUN cat >/etc/apache2/sites-enabled/default <<EOF
<VirtualHost *:80>
DocumentRoot /home
UseCanonicalName Off
RewriteEngine on
RewriteMap lowercase int:tolower
RewriteMap vhost txt:/home/vhost.map
RewriteCond %{REQUEST_URI} !^/cgi-bin/
RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$
RewriteCond ${vhost:%1} ^(/.*)$
RewriteRule ^/(.*)$ %1/$1
RewriteCond %{REQUEST_URI} ^/cgi-bin/
RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$
RewriteCond ${vhost:%1} ^(/.*)$
RewriteRule ^/(.*)$ %1/cgi-bin/$1
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel alert
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment