Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There is a default virtualhost in webmin, the directives seems to same as the file ssl.conf. It seems it processes all requests on port 443 not handled by other virtual servers.

I tried to change the .crt and .key to my custom .crt and .key by changing the two lines

#   Server Certificate:
# Point SSLCertificateFile at a PEM encoded certificate.  If
# the certificate is encrypted, then you will be prompted for a
# pass phrase.  Note that a kill -HUP will prompt again.  A new
# certificate can be generated using the genkey(1) command.
#SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateFile /var/www/html/server.crt

#   Server Private Key:
#   If the key is not combined with the certificate, use this
#   directive to point at the key file.  Keep in mind that if
#   you've both a RSA and a DSA private key you can configure
#   both in parallel (to also allow the use of DSA ciphers, etc.)
#SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
SSLCertificateKeyFile /var/www/html/server.key

but there are errors after I click "apply changes" in webmin

Some of your private key files are encrypted for security reasons. In order to read them you have to provide the pass phrases.

Server (RSA) Enter pass phrase:Apache:mod_ssl:Error: Private key not found.

How do I solve this problem?

* Update *

SSLEngine on
SSLCertificateFile /var/www/html/server.crt
SSLCertificateKeyFile /var/www/html/server.key

    DocumentRoot /var/www/html
    DirectoryIndex index.php index.html index.htm index.shtml 
    LogLevel debug
HostNameLookups off
#DefaultLanguage zh-cn
AddLanguage en .en
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw
AddDefaultCharset UTF-8
AddCharset GB2312      .gb2312 .gb   
AddCharset utf-8       .utf8  
AddCharset big5        .big5 .b5  
UseCanonicalName off
php_value memory_limit 32M


after i config about to httpd.conf

when i access is accessable, but when i access, it can be accessable........, what is the problem?

share|improve this question
One quick comment - is /var/www/html or /var/www your DocumentRoot? If so then your private key may be able to be downloaded by anyone using your site (e.g. via something like The SSL certificate and key should be kept outside the web content area. – meulop May 9 '12 at 9:40
this is just for test~ let me success first – hkinterview May 9 '12 at 9:42
@hkinterview: please only post on one SE site at a time: – Bruno May 9 '12 at 13:02

The private key file is itself encrypted with a passphrase. You need to remove this encryption so that Apache can load it without you typing the passphrase in manually.

You can use openssl to do this:

openssl pkey -in server.key -out server-nopassphrase.key
share|improve this answer
hi, the question is update – hkinterview May 10 '12 at 2:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.