Webmin Installation

Looks like Webmin for Windows cannot read Virtualhost config from a seperate file. If the vhosts are added to httpd.conf it works fine.

That’s not what that error looks like to me. It looks to me like you don’t have Apache configured to include those other files, and Webmin is very politely warning you of that misconfiguration. Webmin supports virtual host configuration in separate files on all supported operating systems, as far as I know. But, in your case, you don’t have Apache configured correctly to use those other files.

That error definitely wouldn’t make me think “Webmin has a bug” it would make me think, “My Apache configuration is wrong for the way I’m trying to use Webmin, and Webmin is really clever to notice that and tell me so.”

I am not a PERL Programmer. Took me days to figure out. This is a BUG. I’ve fixed in on my system and it works now.

This Bug is related to the glob function used in apache-lib.pl, function expand_apache_include.

The problem is default Apache Installation directories under Windows have whitespaces in their name e.g "Program Files/Apache Software Foundation/Apache2.2/conf/

glob() has a bug which does not return the correct values when there are whitespaces in the path, unless ofcourse they are escaped.

I’ve solved this by adding use File::Glob ‘:glob’; at the top of apache-lib.pl.

Refered from http://perldoc.perl.org/File/Glob.html

is_apache_running:
sub is_apache_running
{
if ($gconfig{‘os_type’} eq ‘windows’) {
# No such thing as a PID file on Windows
local ($pid) = &find_byname(“Apache.exe”);
return $pid;
}
else {
# Check PID file
local $pidfile = &get_pid_file();
return &check_pid_file($pidfile);
}
}

the executable is httpd.exe and not Apache.exe in 2.2 atleast. Would be better if that value is read from the config “Path to httpd executable”