There are VDS with three IP addresses. Interfaces are configured, everything works. It is required, by analogy with the 000-default.conf settings, to make settings for all IP addresses.
In 000-default.conf I redirect from the first IP to the first domain (everything works):
<VirtualHost FIRST_IP_HERE:80> ServerAdmin name@example.com ServerName FIRST_IP_HERE Redirect 301 / http://FIRST_DOMAIN_HERE/ ErrorLog ${APACHE_LOG_DIR}/error.log LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> I try by analogy to redirect from another IP to another domain, but redirection when accessing the second IP still goes to the domain from 000-default.conf .
I tried to copy the description of the virtual host in the file 000-default.conf (by changing the IP and domain), and to create the file 001-default.conf and make for it a2ensite . Nothing helps.
Can you please tell me if I can configure apache so that when I access FIRST_IP redirect to FIRST_DOMAIN , when I contact SECOND_IP , I redirect to SECOND_DOMAIN , etc., and if I can, how can I do it?