ssl_faq.html.en revision 6725c54b5fac39d57097f1e51f80500e25a921cd
1fb884d0af74a8b911f5de1cf2b68e33676c088bDominik Luecke<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
9eb6a481980d81a55898ba418fba72fc3c09d8c8Dominik Luecke<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
1fb884d0af74a8b911f5de1cf2b68e33676c088bDominik Luecke XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
98890889ffb2e8f6f722b00e265a211f13b5a861Corneliu-Claudiu Prodescu This file is generated from xml source: DO NOT EDIT
1fb884d0af74a8b911f5de1cf2b68e33676c088bDominik Luecke XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1fb884d0af74a8b911f5de1cf2b68e33676c088bDominik Luecke<title>SSL/TLS Strong Encryption: FAQ - Apache HTTP Server</title>
1fb884d0af74a8b911f5de1cf2b68e33676c088bDominik Luecke<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
1fb884d0af74a8b911f5de1cf2b68e33676c088bDominik Luecke<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
1fb884d0af74a8b911f5de1cf2b68e33676c088bDominik Luecke<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
2af38fde95f93562f2124ec615fba0e509c8202eDominik Luecke<link href="/images/favicon.ico" rel="shortcut icon" /></head>
2af38fde95f93562f2124ec615fba0e509c8202eDominik Luecke<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>
2af38fde95f93562f2124ec615fba0e509c8202eDominik Luecke<p class="apache">Apache HTTP Server Version 2.3</p>
2af38fde95f93562f2124ec615fba0e509c8202eDominik Luecke<img alt="" src="/images/feather.gif" /></div>
1fb884d0af74a8b911f5de1cf2b68e33676c088bDominik Luecke<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div>
da955132262baab309a50fdffe228c9efe68251dCui Jian<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.3</a> > <a href="./">SSL/TLS</a></div><div id="page-content"><div id="preamble"><h1>SSL/TLS Strong Encryption: FAQ</h1>
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke<p><span>Available Languages: </span><a href="/en/ssl/ssl_faq.html" title="English"> en </a> |
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke<a href="/fr/ssl/ssl_faq.html" hreflang="fr" rel="alternate" title="Fran�ais"> fr </a></p>
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke<p>The wise man doesn't give the right answers,
1d677cafe64269a9c961396b85b5b50c126f58d8Dominik Lueckehe poses the right questions.</p>
97c9d39efee30883aa578294c46506ff8a9478c8Christian Maeder<p class="cite">-- <cite>Claude Levi-Strauss</cite></p>
59917a4f0a6a20f5a20bcab1f2a0a0774db56807Dominik Luecke<div id="quickview"><ul id="toc"><li><img alt="" src="/images/down.gif" /> <a href="#installation">Installation</a></li>
fcac596b16bb10f475066c323b9b1ca44db2b755Dominik Luecke<li><img alt="" src="/images/down.gif" /> <a href="#aboutconfig">Configuration</a></li>
6329255607e98810295820b38098229a5ddc5d3bChristian Maeder<li><img alt="" src="/images/down.gif" /> <a href="#aboutcerts">Certificates</a></li>
85f112f807210b70172aab985810a37dc6a85eb3Dominik Luecke<li><img alt="" src="/images/down.gif" /> <a href="#aboutssl">The SSL Protocol</a></li>
1fb884d0af74a8b911f5de1cf2b68e33676c088bDominik Luecke<li><img alt="" src="/images/down.gif" /> <a href="#support">mod_ssl Support</a></li>
90c174bac60a72ffd81bc3bf5ae2dd9a61943b8bChristian Maeder<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1d677cafe64269a9c961396b85b5b50c126f58d8Dominik Luecke<h2><a name="installation" id="installation">Installation</a></h2>
1d677cafe64269a9c961396b85b5b50c126f58d8Dominik Luecke<li><a href="#mutex">Why do I get permission errors related to
548f3850942936a8c6021185c8391dfcd3b03018Dominik Luecke<li><a href="#entropy">Why does mod_ssl stop with the error "Failed to
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Lueckegenerate temporary 512 bit RSA private key" when I start Apache?</a></li>
1d677cafe64269a9c961396b85b5b50c126f58d8Dominik Luecke<h3><a name="mutex" id="mutex">Why do I get permission errors related to
1d677cafe64269a9c961396b85b5b50c126f58d8Dominik Luecke <p>Errors such as ``<code>mod_ssl: Child could not open
1d677cafe64269a9c961396b85b5b50c126f58d8Dominik Luecke SSLMutex lockfile /opt/apache/logs/ssl_mutex.18332 (System error follows)
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke [...] System: Permission denied (errno: 13)</code>'' are usually
59917a4f0a6a20f5a20bcab1f2a0a0774db56807Dominik Luecke caused by overly restrictive permissions on the <em>parent</em> directories.
ffb6099205b26594acf25e64efd338cee362a659Christian Maeder Make sure that all parent directories (here <code>/opt</code>,
ffb6099205b26594acf25e64efd338cee362a659Christian Maeder <code>/opt/apache</code> and <code>/opt/apache/logs</code>) have the x-bit
ffb6099205b26594acf25e64efd338cee362a659Christian Maeder set for, at minimum, the UID under which Apache's children are running (see
ffb6099205b26594acf25e64efd338cee362a659Christian Maeder the <code class="directive"><a href="/mod/mpm_common.html#user">User</a></code> directive).</p>
ffb6099205b26594acf25e64efd338cee362a659Christian Maeder<h3><a name="entropy" id="entropy">Why does mod_ssl stop with the error
ffb6099205b26594acf25e64efd338cee362a659Christian Maeder "Failed to generate temporary 512 bit RSA private key" when I start
ffb6099205b26594acf25e64efd338cee362a659Christian Maeder <p>Cryptographic software needs a source of unpredictable data
ffb6099205b26594acf25e64efd338cee362a659Christian Maeder to work correctly. Many open source operating systems provide
ffb6099205b26594acf25e64efd338cee362a659Christian Maeder a "randomness device" that serves this purpose (usually named
ffb6099205b26594acf25e64efd338cee362a659Christian Maeder <code>/dev/random</code>). On other systems, applications have to
ffb6099205b26594acf25e64efd338cee362a659Christian Maeder seed the OpenSSL Pseudo Random Number Generator (PRNG) manually with
ffb6099205b26594acf25e64efd338cee362a659Christian Maeder appropriate data before generating keys or performing public key
ffb6099205b26594acf25e64efd338cee362a659Christian Maeder encryption. As of version 0.9.5, the OpenSSL functions that need
ffb6099205b26594acf25e64efd338cee362a659Christian Maeder randomness report an error if the PRNG has not been seeded with
ffb6099205b26594acf25e64efd338cee362a659Christian Maeder at least 128 bits of randomness.</p>
59917a4f0a6a20f5a20bcab1f2a0a0774db56807Dominik Luecke <p>To prevent this error, <code class="module"><a href="/mod/mod_ssl.html">mod_ssl</a></code> has to provide
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke enough entropy to the PRNG to allow it to work correctly. This can
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke be done via the <code class="directive"><a href="/mod/mod_ssl.html#sslrandomseed">SSLRandomSeed</a></code>
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke directive.</p>
548f3850942936a8c6021185c8391dfcd3b03018Dominik Luecke</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke<h2><a name="aboutconfig" id="aboutconfig">Configuration</a></h2>
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke<li><a href="#parallel">Is it possible to provide HTTP and HTTPS from
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke<li><a href="#ports">Which port does HTTPS use?</a></li>
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke<li><a href="#httpstest">How do I speak HTTPS manually for testing
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke<li><a href="#hang">Why does the connection hang when I connect to my
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke<li><a href="#refused">Why do I get ``Connection Refused'' errors, when
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecketrying to access my newly installed Apache+mod_ssl server via HTTPS?</a></li>
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke<li><a href="#envvars">Why are the <code>SSL_XXX</code> variables not
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Lueckeavailable to my CGI & SSI scripts?</a></li>
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke<li><a href="#relative">How can I switch between HTTP and HTTPS in
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke<h3><a name="parallel" id="parallel">Is it possible to provide HTTP and HTTPS
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke <p>Yes. HTTP and HTTPS use different server ports (HTTP binds to
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke port 80, HTTPS to port 443), so there is no direct conflict between
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke them. You can either run two separate server instances bound to
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke these ports, or use Apache's elegant virtual hosting facility to
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke create two virtual servers, both served by the same instance of Apache
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke - one responding over HTTP to requests on port 80, and the other
da955132262baab309a50fdffe228c9efe68251dCui Jian responding over HTTPS to requests on port 443.</p>
e0d31c8d6d8ded93c599cbfa9ebc72a2bf1b0a55Dominik Luecke<h3><a name="ports" id="ports">Which port does HTTPS use?</a></h3>
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke<p>You can run HTTPS on any port, but the standards specify port 443, which
97c9d39efee30883aa578294c46506ff8a9478c8Christian Maeder is where any HTTPS compliant browser will look by default. You can force
97c9d39efee30883aa578294c46506ff8a9478c8Christian Maeder your browser to look on a different port by specifying it in the URL. For
6329255607e98810295820b38098229a5ddc5d3bChristian Maeder example, if your server is set up to serve pages over HTTPS on port 8080,
6329255607e98810295820b38098229a5ddc5d3bChristian Maeder you can access them at <code>https://example.com:8080/</code></p>
6329255607e98810295820b38098229a5ddc5d3bChristian Maeder<h3><a name="httpstest" id="httpstest">How do I speak HTTPS manually for testing purposes?</a></h3>
97c9d39efee30883aa578294c46506ff8a9478c8Christian Maeder <div class="example"><p><code>$ telnet localhost 80<br />
3519b5ffec1455664eabfe9c36b8b4c08b42081aChristian Maeder <p>for simple testing of Apache via HTTP, it's not so easy for
6329255607e98810295820b38098229a5ddc5d3bChristian Maeder HTTPS because of the SSL protocol between TCP and HTTP. With the
6329255607e98810295820b38098229a5ddc5d3bChristian Maeder help of OpenSSL's <code>s_client</code> command, however, you can
6329255607e98810295820b38098229a5ddc5d3bChristian Maeder do a similar check via HTTPS:</p>
ffb6099205b26594acf25e64efd338cee362a659Christian Maeder <div class="example"><p><code>$ openssl s_client -connect localhost:443 -state -debug<br />
6329255607e98810295820b38098229a5ddc5d3bChristian Maeder <p>Before the actual HTTP response you will receive detailed
3519b5ffec1455664eabfe9c36b8b4c08b42081aChristian Maeder information about the SSL handshake. For a more general command
3519b5ffec1455664eabfe9c36b8b4c08b42081aChristian Maeder line client which directly understands both HTTP and HTTPS, can
3519b5ffec1455664eabfe9c36b8b4c08b42081aChristian Maeder perform GET and POST operations, can use a proxy, supports byte
3519b5ffec1455664eabfe9c36b8b4c08b42081aChristian Maeder ranges, etc. you should have a look at the nifty
6329255607e98810295820b38098229a5ddc5d3bChristian Maeder <a href="http://curl.haxx.se/">cURL</a> tool. Using this, you can
59917a4f0a6a20f5a20bcab1f2a0a0774db56807Dominik Luecke check that Apache is responding correctly to requests via HTTP and
6329255607e98810295820b38098229a5ddc5d3bChristian Maeder HTTPS as follows:</p>
e0d31c8d6d8ded93c599cbfa9ebc72a2bf1b0a55Dominik Luecke <div class="example"><p><code>$ curl http://localhost/<br />
6329255607e98810295820b38098229a5ddc5d3bChristian Maeder<h3><a name="hang" id="hang">Why does the connection hang when I connect
6329255607e98810295820b38098229a5ddc5d3bChristian Maeder<p>This can happen when you try to connect to a HTTPS server (or virtual
e0d31c8d6d8ded93c599cbfa9ebc72a2bf1b0a55Dominik Luecke server) via HTTP (eg, using <code>http://example.com/</code> instead of
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke <code>https://example.com</code>). It can also happen when trying to
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke connect via HTTPS to a HTTP server (eg, using
1d677cafe64269a9c961396b85b5b50c126f58d8Dominik Luecke <code>https://example.com/</code> on a server which doesn't support HTTPS,
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke or which supports it on a non-standard port). Make sure that you're
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke connecting to a (virtual) server that supports SSL.</p>
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke<h3><a name="refused" id="refused">Why do I get ``Connection Refused'' messages,
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke when trying to access my newly installed Apache+mod_ssl server via HTTPS?</a></h3>
6329255607e98810295820b38098229a5ddc5d3bChristian Maeder This error can be caused by an incorrect configuration.
6329255607e98810295820b38098229a5ddc5d3bChristian Maeder Please make sure that your <code class="directive"><a href="/mod/mpm_common.html#listen">Listen</a></code> directives match your
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke <code class="directive"><a href="/mod/core.html#virtualhost"><VirtualHost></a></code>
8b6e542715e576ffbf6ae13634c85f3445036e77Dominik Luecke directives. If all else fails, please start afresh, using the default
6329255607e98810295820b38098229a5ddc5d3bChristian Maeder configuration provided by <code class="module"><a href="/mod/mod_ssl.html">mod_ssl</a></code>.</p>
scheme). Using <code class="module"><a href="/mod/mod_rewrite.html">mod_rewrite</a></code> however, you can
<code class="module"><a href="/mod/mod_ssl.html">mod_ssl</a></code> built-in is just like starting Apache
server when OpenSSL prompts you for the "CommonName", i.e. when you
<h3><a name="passphrase" id="passphrase">How can I change the pass-phrase on my private key file?</a></h3>
<h3><a name="removepassphrase" id="removepassphrase">How can I get rid of the pass-phrase dialog at Apache startup time?</a></h3>
is that the RSA private key inside your server.key file is stored in
<h3><a name="verify" id="verify">How do I verify that a private key matches its Certificate?</a></h3>
(e.g. Microsoft Internet Explorer) you need the certificate in plain DER
<code class="directive"><a href="/mod/mod_ssl.html#sslcertificatechainfile">SSLCertificateChainFile</a></code>
<code class="directive"><a href="/mod/mod_ssl.html#sslsessioncache">SSLSessionCache</a></code> directive. The DBM session
<code class="directive"><a href="/mod/mod_ssl.html#sslrandomseed">SSLRandomSeed</a></code> which blocks the
manual for the <code class="directive"><a href="/mod/mod_ssl.html#sslrandomseed">SSLRandomSeed</a></code>
are also supported by <code class="module"><a href="/mod/mod_ssl.html">mod_ssl</a></code>. Which ciphers are
``<code>ADH</code>'' into your <code class="directive"><a href="/mod/mod_ssl.html#sslciphersuite">SSLCipherSuite</a></code>.</p>
<h3><a name="vhosts" id="vhosts">Why can't I use SSL with name-based/non-IP-based virtual hosts?</a></h3>
<code class="directive"><a href="/mod/mod_setenvif.html#setenvif">SetEnvIf</a></code> won't solve these
<h3><a name="resources" id="resources">What information resources are available in case of mod_ssl problems?</a></h3>
First check the F.A.Q. (this text). If your problem is a common
should at least provide the <code class="program"><a href="/programs/configure.html">configure</a></code> command line you used.
<p><span>Available Languages: </span><a href="/en/ssl/ssl_faq.html" title="English"> en </a> |
<a href="/fr/ssl/ssl_faq.html" hreflang="fr" rel="alternate" title="Fran�ais"> fr </a></p>
<p class="apache">Copyright 2010 The Apache Software Foundation.<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>