I have installed Webmin, Virtualmin, LAMP on my Debian Stretch server. It's a clean install.
Now my problem is a bit weird, as I have already had it with my previous server a long time ago, and it took me half a year to finally solve it - when first installing [Webmin, Virtualmin, LAMP on my Debian Stretch server], I've tryed to solve it for days, but gave up. In the following half year, I have tried to solve it several (1-3) times, but I could only solve it the last time. I do remember that I have not found the solution on the internet (including this site, other StackExchange websites, the Virtualmin forums, Apache's website and various tutorial/article websites) with my various keywords and sentences which I have searched with, despite there being lots of people having the same issue as me. Non of the solutions that were suggested have worked. Now, it has worked last time, but I don't have that server anymore, and I can't remember what the solution was, and I am trying to figure it out again for the second day.
The problem is, that, when I create a new virtual host, with a domain that is actually pointing to the IP address of the server (or one that's not, but I have forwarded the it ([the domain]) in my hosts file [on my personal computer]) and I go to that site, the default Apache site shows up. I am pretty sure that the virtual host is configured right, or at least it's not, it's not my mistake, as the virtual host has been added by Virtualmin, and not me. When I do my checkings, it seems like it has added it correctly though. If I add a Virtualhost manually, that doesn't work either, however I might have made a mistake while adding the virtual hosts.
If you need any additional information, just please ask. Thank you.
After seeing the description of the Apache tag, this is what
sudo /usr/sbin/apache2ctl -S returns:
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message VirtualHost configuration: *:80 is a NameVirtualHost default server 127.0.1.1 (/etc/apache2/sites-enabled/test.local.conf:1) port 80 namevhost 127.0.1.1 (/etc/apache2/sites-enabled/test.local.conf:1) port 80 namevhost 127.0.1.1 (/etc/apache2/sites-enabled/test2.local.conf:1) ServerRoot: "/etc/apache2" Main DocumentRoot: "/var/www/html" Main ErrorLog: "/var/log/apache2/error.log" Mutex default: dir="/var/run/apache2/" mechanism=default Mutex watchdog-callback: using_defaults Mutex proxy: using_defaults PidFile: "/var/run/apache2/apache2.pid" Define: DUMP_VHOSTS Define: DUMP_RUN_CFG User: name="www-data" id=33 Group: name="www-data" id=33