From bdcafb3ba72c650c7d5c2c159d62b8766a21661a Mon Sep 17 00:00:00 2001 From: Keanu Taufan Date: Thu, 3 Oct 2024 19:50:23 +0700 Subject: [PATCH] task 19 --- BrokoliWebServer/19.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 BrokoliWebServer/19.sh diff --git a/BrokoliWebServer/19.sh b/BrokoliWebServer/19.sh new file mode 100644 index 0000000..46128be --- /dev/null +++ b/BrokoliWebServer/19.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +cat > /etc/apache2/sites-available/ip.conf < + ServerName 10.67.4.2 + ServerAlias 10.67.4.2 + + RewriteEngine On + RewriteRule ^(.*)$ http://www.brokoli.f01.com$1 [R=301,L] + + ErrorLog \${APACHE_LOG_DIR}/redirect_error.log + CustomLog \${APACHE_LOG_DIR}/redirect_access.log combined + +EOL + +a2ensite ip.conf +service apache2 reload \ No newline at end of file