How to create a subfolder in the apache 2?

Hello! There is a need to create a virtual host (just host) with the address www.site.ru/dir
Apache2 Config:
<virtualhost *:80>
#u
 ServerName redcap52.ru/udir
 ServerAlias www.redcap52.ru/udir
 ServerAdmin webmaster@localhost
 DocumentRoot /var/www/udir
 ErrorLog ${APACHE_LOG_DIR}/error_u.log
 CustomLog ${APACHE_LOG_DIR}/access_u.log combined
</virtualhost>

But in the transition throws a 404 error. What am I doing wrong?
July 4th 19 at 23:32
1 answer
July 4th 19 at 23:34
Because the design
ServerName redcap52.ru/udir
ServerAlias www.redcap52.ru/udir
invalid.
You need to set <directory></directory> in the block where ServerName redcap52.ru
View web-programming.com.ua/nastrojka-virtualhost-na-apache2 about the Alias.

Find more questions by tags Apache