tee empty file
use ifne
grep -ri website /etc/apache2 | ifne tee /tmp/outout.log
rm also can help:
grep -ri website /etc/apache2 > /tmp/outout.log ; [[ $? -ne 0 ]] && 'rm' -f /tmp/outout.log
tee empty file
use ifne
grep -ri website /etc/apache2 | ifne tee /tmp/outout.log
rm also can help:
grep -ri website /etc/apache2 > /tmp/outout.log ; [[ $? -ne 0 ]] && 'rm' -f /tmp/outout.log
ServerName testdomain.com
ServerAlias *.testdomain.com
RewriteEngine on
RewriteMap lowercase int:tolower
RewriteCond ${lowercase:%{SERVER_NAME}} ^[a-z0-9-]+\.testdomain\.com$
RewriteRule ^(.+) ${lowercase:%{SERVER_NAME}}$1 [C]
RewriteRule ^([a-z0-9-]+)\.testdomain\.com/(.*) /var/www/vhost/testdomain.com/httpdocs/$1/$2
a2enmod proxy_fcgi
Considering dependency proxy for proxy_fcgi:
Module proxy already enabled
Enabling module proxy_fcgi.
To activate the new configuration, you need to run:
systemctl restart apache2
a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
systemctl restart apache2
add-apt-repository ppa:ondrej/apache2
apt-get update
apt install apache2
a2enmod rewrite
systemctl restart apache2
LogLevel alert rewrite:trace6
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/\.well\-known/acme\-challenge/
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
a2enmod headers
systemctl restart apache2
.htaccess: Invalid command ‘RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration, referer:
a2enmod rewrite
systemctl restart apache2
a2dissite 000-default.conf
a2enmod proxy