I am new on Debian, Built server on Digital Ocean with Debian OS.I successfully added two domains into one droplet:mysite.comanothersite.comCreated new dir:/home/user/www/mysite.com/public_htmland copied files to public_htmlThe config file inside /etc/apache2/sites-available is:DocumentRoot /home/user/www/mysite.com/public_html<Directory /home/user/www/mysite.com/public_html>    Options -Indexes +FollowSymLinks +MultiViews    AllowOverride All    Require all granted</Directory>ErrorLog ${APACHE_LOG_DIR}/myproject-error.logLogLevel warnCustomLog ${APACHE_LOG_DIR}/myproject-access.log combinedOf Course, I enabled the site.I haven't edited apache2.conf file and haven't configured 2nd domain (anothersite.com). Just added this 2nd domain to droplet, that's all.When I enter to the site mysite.com it works perfect. Why is the 2nd domain (anothersite.com) redirected to the 1st (mysite.com) domain?I use Apache 2.4
Domain is redirected to another domain in same droplet
debian;apache httpd
If you have a hostname (e.g. anothersite.com) point to the apache webserver but you haven't explicitely configured a <VirtualHost> section that matches that hostname, then apache will deliver a best match (the first ).so if you only have a single <VirtualHost> in your apache config, and multiple hostnames (mysite.com and anothersite.com) point to the same machine, all of these names will display the same virtual host.