This file contains 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 characters
#!/bin/sh | |
WEBSITE="$1" | |
Green='\033[0;32m' | |
Color_Off='\033[0m' | |
echo -e $Green | |
echo "Creating $WEBSITE.test.conf..." | |
cp /etc/apache2/sites-available/template /etc/apache2/sites-available/$WEBSITE.test.conf |
This file contains 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 characters
<VirtualHost *:80> | |
# The ServerName directive sets the request scheme, hostname and port that | |
# the server uses to identify itself. This is used when creating | |
# redirection URLs. In the context of virtual hosts, the ServerName | |
# specifies what hostname must appear in the request's Host: header to | |
# match this virtual host. For the default virtual host (this file) this | |
# value is not decisive as it is used as a last resort host regardless. | |
# However, you must set it for any further virtual host explicitly. | |
#ServerName www.example.com | |
This file contains 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 characters
#!/bin/sh | |
FROMVERSION=$(php -v|grep --only-matching --perl-regexp "(PHP )\d+\.\\d+\.\\d+"|cut -c 5-7); | |
TOVERSION="$1" | |
update-alternatives --set php /usr/bin/php$TOVERSION | |
a2dismod php$FROMVERSION | |
a2enmod php$TOVERSION | |
service apache2 restart | |
echo "done" |
This file contains 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 characters
#!/bin/sh | |
RED='\033[0;31m' | |
NC='\033[0m' | |
echo "${RED}Deleting pub/static ${NC}" | |
rm -r pub/static/* | |
echo "${RED}Deleting var/cache ${NC}" |