ServerName 1.multi.vhost.tld
ServerAlias first.multi.vhost.tld
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ServerName 2.multi.vhost.tld
ServerAlias second.multi.vhost.tld
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ b://u%{REQUEST_URI} [P,NE,L]
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTPS} !^$
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [L,NE,R=permanent]
ServerName 3.multi.vhost.tld
ServerAlias third.multi.vhost.tld
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteRule "^/secrets/(.+)" "https://new.example.com/docs/$1" [R,L]
RewriteRule "^/docs/(.+)" "http://new.example.com/docs/$1" [R,L]