If you don’t use virtualhost and do the whole website to directory mapping with mod_rewrite, you have to use %V instead of %v in the line LogFormat…

UseCanonicalName Off
RewriteEngine on
###
# Only a domain - eg. linux.org dyndns.org
# /var/www/linux.org/ /var/www/dyndns.org/
#
RewriteCond %{SERVER_NAME} ^([^.]+)\.([^.]+)$
RewriteRule ^(.*)$ /var/www/%1.%2$1
# One host - eg. www.linux.org schmidi2.dyndns.org
# /var/www/linux.org/www/ /var/www/dyndns.org/schmidi2/
#
RewriteCond %{SERVER_NAME} ^([^.]+)\.([^.]+)\.([^.]+)$
RewriteRule ^(.*)$ /var/www/%2.%3/%1$1
# Two hosts - eg. lists.admin.linux.org blog.schmidi2.dyndns.org
# /var/www/linux.org/admin/lists/ /var/www/dyndns.org/schmidi2/blog/
#
RewriteCond %{SERVER_NAME} ^([^.]+)\.([^.]+)\.([^.]+)\.([^.]+)$
RewriteRule ^(.*)$ /var/www/%3.%4/%2/%1$1
# Else show an error page
#
###
###
###
# --> Not Found

Use:

## vlogger
LogFormat "%V %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

References

Directory-based virtual hosts using mod_rewrite

Leave a Reply

Your email address will not be published. Required fields are marked *