From e73dfc839937398480f9336d11b10bf54cf411e7 Mon Sep 17 00:00:00 2001 From: Keanu Taufan Date: Thu, 3 Oct 2024 19:12:52 +0700 Subject: [PATCH] task 16 --- BrokoliWebServer/16.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 BrokoliWebServer/16.sh diff --git a/BrokoliWebServer/16.sh b/BrokoliWebServer/16.sh new file mode 100644 index 0000000..0453159 --- /dev/null +++ b/BrokoliWebServer/16.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +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 + + + Options +Indexes + + + + Options +Indexes + + + + Options +FollowSymLinks -Multiviews + AllowOverride All + + + + Require all denied + + + Alias "/img" "/var/www/vitamin.brokoli.f01/public/images" + Alias "/js" "/var/www/vitamin.brokoli.f01/public/js" + + ErrorLog \${APACHE_LOG_DIR}/error.log + CustomLog \${APACHE_LOG_DIR}/access.log combined + +EOL + +service apache2 reload \ No newline at end of file