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