Hello
When enabling mod_ssl on Virtualmin features, /virtual-server/edit_newfeatures.cgi
if the directive "Listen 443" isn't set, this error is shown:
"Failed to save enabled features : The Apache configuration on your system does not appear to be listening on port 443, which is needed to host SSL websites. If you do not plan to host SSL sites, this feature should be disabled in Virtualmin's module configuration page."
However, virtualmin is disregarding equivalent directives, like these:
<IfDefine HTTP_PORT_443="">
<IfModule mod_ssl.c="">
# Listen: any address
Listen :443
</IfModule>
<IfModule mod_gnutls.c="">
# Listen: any address
Listen :443
</IfModule>
</IfDefine>
Haven't tried with per IP binding/listening, but that could prove useful with multiple IP setups // multiple web servers (apache, nginx).
Would it be possible to make parsing of Listen a bit more intelligent?
PS: Not sure where it is obtaining the port -- might be a good idea to recheck if it's hardcoded or read from within virtualmin or elsewhere configuration.
If it's a big stop gap on development, how about removing the critical check and just show a notice?
Thanks! =)
re-adding the code
update:
i just tested and virtualmin reads the ports from /virtual-server/edit_newtmpl.cgi
so that's ok.
Last edit: Luís Pedro Algarvio 2013-06-17
update 2:
Correction, Virtualmin is not detecting Listen directives inside IfDefine directives.
Does detect inside IfModule directives, and also with Listen *:port directive.
This bug has the same cause (use of IfDefine) as your other bug : https://sourceforge.net/p/webadmin/bugs/4257/