17 lines
397 B
Bash
17 lines
397 B
Bash
#!/bin/bash
|
|
|
|
cat > /etc/apache2/sites-available/ip.conf <<EOL
|
|
<VirtualHost *:80>
|
|
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
|
|
</VirtualHost>
|
|
EOL
|
|
|
|
a2ensite ip.conf
|
|
service apache2 reload |