first I copy 000-default.conf
cp 000-default.conf demo
then I link demo in site-avaible
ln -s ../sites-available/demo demo
here is my 000-default.conf I want to set project run in www.example.com
<VirtualHost *:80>
ServerName example.com
ServerAlias demo.example.com/
DocumentRoot /var/www/html/test/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combin
</VirtualHost>
here is my demo file I want to project run in demo.example.com
<VirtualHost *:80>
ServerName www.example.com
DocumentRoot /var/www/html/main/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/html/main/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
after that I run service apache2 restart I can enter in www.example.com only but I cant enter to demo.example.com . I'm not sure what I'm doing wrong