Commit 116ba77b authored by Dashamir Hoxha's avatar Dashamir Hoxha

Update apache config script

parent 9338e1ec
......@@ -45,27 +45,6 @@ a2dissite 000-default
a2ensite bcl
a2enmod headers rewrite
### create a script to check for apache2, and start it if not running
cat <<'EOF' > /usr/local/sbin/apachemonitor.sh
#!/bin/bash
# restart apache if it is down
if ! /usr/bin/pgrep apache2
then
date >> /usr/local/apachemonitor.log
rm /var/run/apache2/apache2.pid
/etc/init.d/apache2 restart
fi
EOF
chmod +x /usr/local/sbin/apachemonitor.sh
### setup a cron job to monitor apache2
mkdir -p /etc/cron.d/
cat <<'EOF' > /etc/cron.d/apachemonitor
* * * * * root /usr/local/sbin/apachemonitor.sh >/dev/null 2>&1
EOF
chmod +x /etc/cron.d/apachemonitor
### limit the memory size of apache2 when developing
if [[ -n $DEV ]]; then
sed -i /etc/php/7.1/apache2/php.ini \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment