From a3cb863f98f0d21573c691ad4233a9b9c2f52ee8 Mon Sep 17 00:00:00 2001 From: Keanu Taufan Date: Thu, 3 Oct 2024 14:47:27 +0700 Subject: [PATCH] task 12 --- BrokoliWebServer/12.sh | 25 +++++++++++++++++++++++++ BrokoliWebServer/setup.sh | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 BrokoliWebServer/12.sh diff --git a/BrokoliWebServer/12.sh b/BrokoliWebServer/12.sh new file mode 100644 index 0000000..5315013 --- /dev/null +++ b/BrokoliWebServer/12.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +curl -o vitamin.zip https://fs.taufan.dev/public/jarkom/vitamin.brokoli.yyy.com.zip +unzip vitamin.zip +mv vitamin.brokoli.yyy.com /var/www/vitamin.brokoli.f01 + +service nginx stop +service php7.2-fpm stop +service apache2 start + +cat > /etc/apache2/sites-available/vitamin.conf < + ServerName vitamin.brokoli.f01.com + ServerAlias www.vitamin.brokoli.f01.com + + ServerAdmin webmaster@localhost + DocumentRoot /var/www/vitamin.brokoli.f01 + + ErrorLog \${APACHE_LOG_DIR}/error.log + CustomLog \${APACHE_LOG_DIR}/access.log combined + +EOL + +a2ensite vitamin.conf +service apache2 reload \ No newline at end of file diff --git a/BrokoliWebServer/setup.sh b/BrokoliWebServer/setup.sh index e700e73..2cbd5af 100644 --- a/BrokoliWebServer/setup.sh +++ b/BrokoliWebServer/setup.sh @@ -2,4 +2,4 @@ echo "nameserver 192.168.122.1" > /etc/resolv.conf apt-get update -apt-get install unzip php7.2-fpm nginx -y \ No newline at end of file +apt-get install unzip php7.2 php7.2-fpm apache nginx -y \ No newline at end of file