0

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
0

Does the Virtualmin create the <VirtualHost>s in the same way they are handled in the Debian 9? Debian uses separate configuration files, included from /etc/apache2/sites-enabled/ using IncludeOptional sites-enabled/*.conf.

This means that your configuration files

  • should have the symlinks in /etc/apache2/sites-enabled/ (from configuration files stored in /etc/apache2/sites-available/, using command a2ensite site or manually ln -s)
  • must have .conf suffix.

Your apache2ctl -S states that you only have one <VirtualHost *:80> matching these conditions and it has been read from /etc/apache2/sites-enabled/000-default.conf, starting from line 1.

If your Webmin is not handling configuration files this way, check the Operating System and Environment settings and pick the correct distribution.

  • Sorry about that. I have now updated the output of apache2ctl -S. This is what it shows after creating 2 test domains. (I have pointed the domains in my hosts files to the my server, if I enter it, the default Debian Apache page comes up.) The system version seems to be right. – Joseph Apr 6 '18 at 18:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.