Hi,
I have two domains and they are all under CF service.
I have configured two vhosts on one VPS, they have different root directories. I want my two domain names to be able to access two vhosts respectively. However, they all point to the root directory of the first vhost.
In fact, no matter which domain name I visit, I will enter /var/www/html
I don’t know if it’s my configuration problem.
I‘d be grateful if you would help.
My file 000-default.conf is as follows:
<VirtualHost *:80>
ServerName Mydomain1.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory "/var/www/html">
AllowOverride ALL
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:8082>
ServerName Mydomain2.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/tools
<Directory "/var/www/tools">
AllowOverride ALL
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>