]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Add support for 'Protocol' to mod_ssl.
authorPaul Querna <pquerna@apache.org>
Thu, 5 May 2005 23:15:20 +0000 (23:15 +0000)
committerPaul Querna <pquerna@apache.org>
Thu, 5 May 2005 23:15:20 +0000 (23:15 +0000)
Example Config:

Listen 10.0.0.10:443 https

<VirtualHost 10.0.0.10:443>
SLCertificateFile conf/server.cert
SSLCertificateKeyFile conf/server.key
ServerName foo:443
DocumentRoot /var/www/foo
....
</VirtualHost>

Notice, no need for 'SSLEngine on'.  You can also set 'Protocol https' inside the virtual host,
if you do not set it in the Listen command.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/listen-protocol@168462 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_engine_init.c

index 90094df44fbc287507b89730585507a020135d58..1f397afab5db683ddd912254a42d61cf7f9ffab5 100644 (file)
@@ -207,8 +207,13 @@ int ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
         sc->vhost_id = ssl_util_vhostid(p, s);
         sc->vhost_id_len = strlen(sc->vhost_id);
 
+        if (strcmp("https", ap_get_server_protocol(s)) == 0) {
+            sc->enabled = SSL_ENABLED_TRUE;
+        }
+
        /* If sc->enabled is UNSET, then SSL is optional on this vhost  */
         /* Fix up stuff that may not have been set */
+
         if (sc->enabled == SSL_ENABLED_UNSET) {
             sc->enabled = SSL_ENABLED_FALSE;
         }
@@ -879,7 +884,8 @@ static void ssl_init_server_certs(server_rec *s,
 
     if (!(have_rsa || have_dsa)) {
         ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
-                "Oops, no RSA or DSA server certificate found?!");
+                "Oops, no RSA or DSA server certificate found "
+                "for '%s:%d'?!", s->server_hostname, s->port);
         ssl_die();
     }