0

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
ServerName www.domainName.com
    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
</VirtualHost>

it can access the web through http://www.domainName.com:443, but no cert is detected by the browser....

what the problems?

1
  • 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, 2012 at 11:10

4 Answers 4

1

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

2
  • if access domainName.com, the browser say "internet explorer cannot display the webpage" May 10, 2012 at 6:58
  • I assume you had domainName.com, not just domainName.com? 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, 2012 at 7:20
0

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)?

2
0

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)

0

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 ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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