Menu

#4256 Virtualmin: fails to detect Listen *:443 directive when enabling apache SSL feature

1.630
closed-duplicate
nobody
None
5
2013-06-17
2013-06-17
No

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:

Main HTTPS (443)

<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! =)

Discussion

  • Luís Pedro Algarvio

    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
  • Luís Pedro Algarvio

    update 2:

    Correction, Virtualmin is not detecting Listen directives inside IfDefine directives.
    Does detect inside IfModule directives, and also with Listen *:port directive.

     
  • Jamie Cameron

    Jamie Cameron - 2013-06-17
    • status: open --> closed-duplicate
     
  • Jamie Cameron

    Jamie Cameron - 2013-06-17

    This bug has the same cause (use of IfDefine) as your other bug : https://sourceforge.net/p/webadmin/bugs/4257/

     

Log in to post a comment.