Skip to content

Instantly share code, notes, and snippets.

@esron
Created October 5, 2018 23:43
Show Gist options
  • Select an option

  • Save esron/7857d0d6d7fe516639aa4be65635bb32 to your computer and use it in GitHub Desktop.

Select an option

Save esron/7857d0d6d7fe516639aa4be65635bb32 to your computer and use it in GitHub Desktop.
Files for download in a cloud build of a Docker image
<VirtualHost *:80>
ServerName dev.app
ServerAlias www.dev.app
ServerAdmin webmaster@localhost
DocumentRoot /var/www/dev
<Directory />
Options -Indexes +FollowSymLinks +MultiViews +Includes
AllowOverride AuthConfig
Order allow,deny
allow from all
</Directory>
<Directory /var/www/dev>
Options -Indexes +FollowSymLinks +MultiViews +Includes
Order allow,deny
allow from all
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</Directory>
ErrorLog /tmp/dev.log
CustomLog /tmp/dev.log combined
</VirtualHost>
#!/bin/bash
PUBLIC_FOLDER=$1
ln -sfn $1 /var/www/dev
service apache2 start
#!/bin/bash
SELECTED=$1
if [ "$SELECTED" = "7.2" ]; then
update-alternatives --set php /usr/bin/php7.2
a2dismod php7.1
a2dismod php7.0
a2dismod php5.6
a2enmod php7.2
service apache2 restart
echo "PHP 7.2 ACTIVATED!"
exit 0
fi
if [ "$SELECTED" = "7.1" ]; then
update-alternatives --set php /usr/bin/php7.1
a2dismod php7.2
a2dismod php7.0
a2dismod php5.6
a2enmod php7.1
service apache2 restart
echo "PHP 7.1 ACTIVATED!"
exit 0
fi
if [ "$SELECTED" = "7.0" ]; then
update-alternatives --set php /usr/bin/php7.0
a2dismod php7.2
a2dismod php7.1
a2dismod php5.6
a2enmod php7.0
service apache2 restart
echo "PHP 7.0 ACTIVATED!"
exit 0
fi
if [ "$SELECTED" = "5.6" ]; then
update-alternatives --set php /usr/bin/php5.6
a2dismod php7.2
a2dismod php7.1
a2dismod php7.0
a2enmod php5.6
service apache2 restart
echo "PHP 5.6 ACTIVATED!"
exit 0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment