Jay Martin's picture

I recently downloaded and installed the current issue of LAMP Stack.  I had a problem when I created a virtual host in Webmin.  After hours of troubleshooting, I found that webmin was creating the new virtual host "conf" file in the sites-available folder, yet the apache.conf file was looking for the conf files in the sites-enabled folder.  This should be fixed so that it does not come broken out of the box.  Thanks.

Forum: 
Jeremy Davis's picture

FWIW IMO Apache config is easier (and more transparent) when done via the commandline. To me it's more logical and much less confusing, but YMMV.

What Webmin is doing is expected (best practice) behaviour, as there should be no "real" files in /etc/apache2/sites-enabled/. There should only be symlinks to the "real" files in /etc/apache2/sites-available/. But that's only part of it, the "available" sites then need to be "enabled". So it sounds like the "enable" step was missing.

Either it's not obvious that this is required and it needs to be done somewhere else within Webmin (my suspicion - adding ports to a vhost has that issue). Or perhaps it's actually broken and isn't doing that step when it should be?

FWIW when you do config via commandline, you create the new vhost in /etc/apache2/sites-available/new-host.conf and then enable it with the command "a2ensite new-host.conf" (which creates the symlinks in the right place). You can then disable it again with "a2dissite new-host.conf" if you wish.

ANDREAS ZASTROW's picture

tutorial:

   ioncubeturnkeylampvirtualboxwindows.wordpress.com

Add new comment