Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

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
add comment

4 Answers 4

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?

share|improve this answer
    
if access domainName.com, the browser say "internet explorer cannot display the webpage" –  hkinterview May 10 '12 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 '12 at 7:20
add comment

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 akadia.com/services/ssh_test_certificate.html –  hkinterview May 10 '12 at 7:16
add comment

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
add comment

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
add comment

Your Answer

 
discard

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.