https://bz.apache.org/bugzilla/show_bug.cgi?id=62033

            Bug ID: 62033
           Summary: Required SSLHostConfig named _default_
           Product: Tomcat 9
           Version: 9.0.2
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Util
          Assignee: dev@tomcat.apache.org
          Reporter: csuth...@apache.org
  Target Milestone: -----

When using an SSLHostConfig in your SSL Connector there has to be one named
"_default_". If there isn't, you will get the following exception:

~~~
Caused by: java.lang.IllegalArgumentException: No SSLHostConfig element was
found with the hostName [_default_] to match the defaultSSLHostConfigName for
the connector [https-openssl-nio-8443]
~~~

and the Connector will fail to start. This behavior can be reproduced using the
following Connector configuration:

~~~
    <Connector port="8443"
protocol="org.apache.coyote.http11.Http11NioProtocol"
               maxThreads="150" SSLEnabled="true">
        <SSLHostConfig hostName="test">
            <Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>
~~~

Is that really necessary? I've seen a few users try to specify "localhost" as
the hostName on the config to tie certificates to (I assume), which causes this
failure and forces them to remove hostName or use "_default_", but tomcat
doesn't behave that way with any other configuration elements. Could we do
something like httpd does with VirtualHost and make the first one listed (or
the auto-generated one from SSLHostConfig attributes placed in a Connector
element) be the default?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to