Compare commits
2 Commits
abeb23e90b
...
021d36b131
Author | SHA1 | Date |
---|---|---|
Ray Elliott | 021d36b131 | |
Ray Elliott | 8bea5f2250 |
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ "$apache2_version" != 'latest' ] ; then
|
||||||
|
echo 'ERROR: unable to install Apache2 - only '"'latest'"' version currently supported'
|
||||||
|
exit 30
|
||||||
|
fi
|
||||||
|
|
||||||
|
ssh -T $ssh << EOSSH
|
||||||
|
echo "Installing Apache2"
|
||||||
|
apt install -y apache2
|
||||||
|
ufw allow in "WWW Full"
|
||||||
|
|
||||||
|
sed -i '/export APACHE_RUN_USER=/c\export APACHE_RUN_USER='"$user" /etc/apache2/envvars
|
||||||
|
sed -i '/export APACHE_RUN_GROUP=/c\export APACHE_RUN_GROUP='"$group" /etc/apache2/envvars
|
||||||
|
chown -R "$user:$group" "/var/www/html"
|
||||||
|
echo "Nothing here ..." > /var/www/html/index.html
|
||||||
|
systemctl restart apache2
|
||||||
|
EOSSH
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue