ssl_faq.html.en
来自「Apache HTTP Server 是一个功能强大的灵活的与HTTP/1.1相」· EN 代码 · 共 1,017 行 · 第 1/4 页
EN
1,017 行
different virtual hosts. It allows you to use the same IP address and the same port number for many different sites. When people move on to SSL, it seems natural to assume that the same method can be used to have lots of different SSL virtual hosts on the same server.</p> <p>It comes as rather a shock to learn that it is impossible.</p> <p>The reason is that the SSL protocol is a separate layer which encapsulates the HTTP protocol. So the problem is that the SSL session is a separate transaction that takes place before the HTTP session even starts. Therefore all the server receives is an SSL request on IP address X and port Y (usually 443). Since the SSL request does not contain any Host: field, the server has no way to decide which SSL virtual host to use. Usually, it will just use the first one it finds that matches the port and IP address.</p> <p>You can, of course, use Name-Based Virtual Hosting to identify many non-SSL virtual hosts (all on port 80, for example) and then you can have no more than 1 SSL virtual host (on port 443). But if you do this, you must make sure to put the non-SSL port number on the NameVirtualHost directive, e.g.</p> <div class="example"><p><code> NameVirtualHost 192.168.1.1:80 </code></p></div> <p>Other workaround solutions are: </p> <p>Use separate IP addresses for different SSL hosts. Use different port numbers for different SSL hosts.</p> <h3><a name="lockicon" id="lockicon">When I use Basic Authentication over HTTPS the lock icon in Netscape browsersstill shows the unlocked state when the dialog pops up. Does this mean theusername/password is still transmitted unencrypted?</a></h3><p>No, the username/password is already transmitted encrypted. The icon in Netscape browsers is just not really synchronized with the SSL/TLS layer (it toggles to the locked state when the first part of the actual webpage data is transferred which is not quite correct) and this way confuses people. The Basic Authentication facility is part of the HTTP layer and this layer is above the SSL/TLS layer in HTTPS. And before any HTTP data communication takes place in HTTPS the SSL/TLS layer has already done the handshake phase and switched to encrypted communication. So, don't get confused by this icon.</p><h3><a name="msie" id="msie">When I connect via HTTPS to an Apache+mod_ssl+OpenSSL server with Microsoft InternetExplorer (MSIE) I get various I/O errors. What is the reason?</a></h3><p>The first reason is that the SSL implementation in some MSIE versions has some subtle bugs related to the HTTP keep-alive facility and the SSL close notify alerts on socket connection close. Additionally the interaction between SSL and HTTP/1.1 features are problematic with some MSIE versions, too. You've to work-around these problems by forcing Apache+mod_ssl+OpenSSL to not use HTTP/1.1, keep-alive connections or sending the SSL close notify messages to MSIE clients. This can be done by using the following directive in your SSL-aware virtual host section:</p> <div class="example"><p><code> SetEnvIf User-Agent ".*MSIE.*" \<br /> nokeepalive ssl-unclean-shutdown \<br /> downgrade-1.0 force-response-1.0 </code></p></div> <p>Additionally it is known some MSIE versions have also problems with particular ciphers. Unfortunately one cannot workaround these bugs only for those MSIE particular clients, because the ciphers are already used in the SSL handshake phase. So a MSIE-specific <code class="directive"><a href="../mod/mod_setenvif.html#setenvif">SetEnvIf</a></code> doesn't work to solve these problems. Instead one has to do more drastic adjustments to the global parameters. But before you decide to do this, make sure your clients really have problems. If not, do not do this, because it affects all(!) your clients, i.e., also your non-MSIE clients.</p> <p>The next problem is that 56bit export versions of MSIE 5.x browsers have a broken SSLv3 implementation which badly interacts with OpenSSL versions greater than 0.9.4. You can either accept this and force your clients to upgrade their browsers, or you downgrade to OpenSSL 0.9.4 (hmmm), or you can decide to workaround it by accepting the drawback that your workaround will horribly affect also other browsers:</p> <div class="example"><p><code>SSLProtocol all -SSLv3</code></p></div> <p>This completely disables the SSLv3 protocol and lets those browsers work. But usually this is an even less acceptable workaround. A more reasonable workaround is to address the problem more closely and disable only the ciphers which cause trouble.</p> <div class="example"><p><code>SSLCipherSuite ALL:!ADH:<strong>!EXPORT56</strong>:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP</code> </p></div> <p>This also lets the broken MSIE versions work, but only removes the newer 56bit TLS ciphers.</p> <p>Another problem with MSIE 5.x clients is that they refuse to connect to URLs of the form <code>https://12.34.56.78/</code> (IP-addresses are used instead of the hostname), if the server is using the Server Gated Cryptography (SGC) facility. This can only be avoided by using the fully qualified domain name (FQDN) of the website in hyperlinks instead, because MSIE 5.x has an error in the way it handles the SGC negotiation.</p> <p>And finally there are versions of MSIE which seem to require that an SSL session can be reused (a totally non standard-conforming behaviour, of course). Connection with those MSIE versions only work if a SSL session cache is used. So, as a work-around, make sure you are using a session cache (see <code class="directive"><a href="../mod/mod_ssl.html#sslsessioncache">SSLSessionCache</a></code> directive).</p><h3><a name="nn" id="nn">When I connect via HTTPS to an Apache+mod_ssl server with Netscape Navigator Iget I/O errors and the message "Netscape has encountered bad data from theserver" What's the reason?</a></h3><p> The problem usually is that you had created a new server certificate with the same DN, but you had told your browser to accept forever the old server certificate. Once you clear the entry in your browser for the old certificate, everything usually will work fine. Netscape's SSL implementation is correct, so when you encounter I/O errors with Netscape Navigator it is most of the time caused by the configured certificates.</p></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="section"><h2><a name="support" id="support">About Support</a></h2><ul><li><a href="#resources">Resources in case of problems?</a></li><li><a href="#contact">Support in case of problems?</a></li><li><a href="#reportdetails">How to write a problem report?</a></li><li><a href="#coredumphelp">I got a core dump, can you help me?</a></li><li><a href="#backtrace">How to get a backtrace?</a></li></ul><h3><a name="resources" id="resources">What information resources are available in case of mod_ssl problems?</a></h3><p>The following information resources are available. In case of problems you should search here first.</p> <dl> <dt>Answers in the User Manual's F.A.Q. List (this)</dt> <dd><a href="http://httpd.apache.org/docs-2.0/ssl/ssl_faq.html"> http://httpd.apache.org/docs-2.0/ssl/ssl_faq.html</a><br /> First look inside the F.A.Q. (this text), perhaps your problem is such popular that it was already answered a lot of times in the past. </dd> <dt>Postings from the modssl-users Support Mailing List <a href="http://www.modssl.org/support/">http://www.modssl.org/support/</a></dt> <dd>Second search for your problem in one of the existing archives of the modssl-users mailing list. Perhaps your problem popped up at least once for another user, too. </dd> </dl><h3><a name="contact" id="contact">What support contacts are available in case of mod_ssl problems?</a></h3> <p>The following lists all support possibilities for mod_ssl, in order of preference, i.e. start in this order and do not pick the support possibility you just like most, please.</p> <ol> <li><em>Write a Problem Report into the Bug Database</em><br /> <a href="http://www.modssl.org/support/bugdb/"> http://www.modssl.org/support/bugdb/</a><br /> This is the preferred way of submitting your problem report, because this way it gets filed into the bug database (it cannot be lost) <em>and</em> send to the modssl-users mailing list (others see the current problems and learn from answers). </li> <li><em>Write a Problem Report to the modssl-users Support Mailing List</em><br /> <a href="mailto:modssl-users@modssl.org"> modssl-users@modssl.org</a><br /> This is the second way of submitting your problem report. You have to subscribe to the list first, but then you can easily discuss your problem with both the author and the whole mod_ssl user community. </li> </ol><h3><a name="reportdetails" id="reportdetails">What information and details should I provide when writing a bug report?</a></h3><p>You have to at least always provide the following information:</p> <dl> <dt>Apache and OpenSSL version information</dt> <dd>The Apache version can be determined by running <code>httpd -v</code>. The OpenSSL version can be determined by running <code>openssl version</code>. Alternatively when you have Lynx installed you can run the command <code>lynx -mime_header http://localhost/ | grep Server</code> to determine all information in a single step. </dd> <dt>The details on how you built and installed Apache+mod_ssl+OpenSSL</dt> <dd>For this you can provide a logfile of your terminal session which shows the configuration and install steps. Alternatively you can at least provide the <code class="program"><a href="../programs/configure.html">configure</a></code> command line you used. </dd> <dt>In case of core dumps please include a Backtrace</dt> <dd>In case your Apache+mod_ssl+OpenSSL should really dump core please attach a stack-frame ``backtrace'' (see the next question on how to get it). Without this information the reason for your core dump cannot be found. So you have to provide the backtrace, please. </dd> <dt>A detailed description of your problem</dt> <dd>Don't laugh, I'm totally serious. I already got a lot of problem reports where the people not really said what's the actual problem is. So, in your own interest (you want the problem be solved, don't you?) include as much details as possible, please. But start with the essentials first, of course. </dd> </dl><h3><a name="coredumphelp" id="coredumphelp">I got a core dump, can you help me?</a></h3><p>In general no, at least not unless you provide more details about the code location where Apache dumped core. What is usually always required in order to help you is a backtrace (see next question). Without this information it is mostly impossible to find the problem and help you in fixing it.</p><h3><a name="backtrace" id="backtrace">Ok, I got a core dump but how do I get a backtrace to find out the reason for it?</a></h3><p>Follow the following steps:</p> <ol> <li>Make sure you have debugging symbols available in at least Apache. On platforms where you use GCC/GDB you have to build Apache+mod_ssl with ``<code>OPTIM="-g -ggdb3"</code>'' to achieve this. On other platforms at least ``<code>OPTIM="-g"</code>'' is needed. </li> <li>Startup the server and try to produce the core-dump. For this you perhaps want to use a directive like ``<code>CoreDumpDirectory /tmp</code>'' to make sure that the core-dump file can be written. You then should get a <code>/tmp/core</code> or <code>/tmp/httpd.core</code> file. When you don't get this, try to run your server under an UID != 0 (root), because most "current" kernels do not allow a process to dump core after it has done a <code>setuid()</code> (unless it does an <code>exec()</code>) for security reasons (there can be privileged information left over in memory). Additionally you can run <code>/path/to/httpd -X</code> manually to force Apache to not fork. </li> <li>Analyze the core-dump. For this run <code>gdb /path/to/httpd /tmp/httpd.core</code> or a similar command has to run. In GDB you then just have to enter the <code>bt</code> command and, voila, you get the backtrace. For other debuggers consult your local debugger manual. Send this backtrace to the author. </li> </ol></div></div><div class="bottomlang"><p><span>Available Languages: </span><a href="../en/ssl/ssl_faq.html" title="English"> en </a></p></div><div id="footer"><p class="apache">Copyright 1995-2005 The Apache Software Foundation or its licensors, as applicable.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p><p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?