Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

here is the virtual config

<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /var/www/html/server.crt
SSLCertificateKeyFile /var/www/html/server.key
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
CustomLog logs/ssl_request_log \
   "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

    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

it can access the web through, but no cert is detected by the browser....

what the problems?

share|improve this question
STOP HERE ! Putting your private key in the docroot is an AWFUL thing to do ! Put that in a dedicated folder, "/etc/apache2/ssl" for example and make it read-only for your apache user. The reason why is that anybody can take your private key and will then happily decrypt all traffic between your server and clients if he can sniff it (think MITM). – Shadok May 10 '12 at 11:10

If you really access it by, that means that you're forcing HTTP on your browser even though you're using https. What happens if you instead access it through ? What do your logs say?

share|improve this answer
if access, the browser say "internet explorer cannot display the webpage" – hkinterview May 10 '12 at 6:58
I assume you had, not just It helps to be exact... As another responder said, you may also need a CertificateChainFile. But step one is to check your apache error logs to see what they say. – Jenny D May 10 '12 at 7:20

Where did the certificate file come from? Is it self generated or delivered by an official CA? You might need to add the intermediate certifcate file (SSLCertificateChainFile)?

share|improve this answer
self generated.. – hkinterview May 10 '12 at 7:14
i follow this to create – hkinterview May 10 '12 at 7:16

I think it's not the ChainFile, and the CACert one.

I think you need to enable SSLOptions +StdVars in your PHP folder.

Check if default Apache config is listening to 443 and not serving the default VirtualHost. (ssl.conf)

share|improve this answer

This might be because it needs to echo password for the cert to work. Take a look at ssl_request_log and error.log . Does it have anything relavant ?

share|improve this answer

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.