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

Got a problem where when I try to access https://betterexaminations.ie, I get connection refused, but when I try by the ip, it works fine, (https://) 46.137.41.29.

Any ideas what the problem could be?

Here my nginx config:

worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {

    passenger_root /var/lib/gems/1.8/gems/passenger-3.0.12;
    passenger_ruby /usr/bin/ruby1.8;
        server {
                listen 443;
                server_name betterexaminations.ie;
                root /var/rails/papers/public/;
                passenger_enabled on;
                ssl on;
                ssl_certificate /var/rails/papers/certs/csr/thawte/certificate.bundle.cert;
                ssl_certificate_key /var/rails/papers/certs/csr/www.betterexaminations.ie.key;
                ssl_verify_depth 3;

        }       



        server {
                listen 80;
                server_name betterexaminations.ie;
                root /var/rails/papers/public/;
                passenger_enabled on;
        }    
}

I get no interesting errors in Nginx logs or rails logs.

Any ideas?

EDIT:

nmap -sT -r -n -p443 betterexaminations.ie

outputs:

Starting Nmap 5.21 ( http://nmap.org ) at 2012-11-29 01:01 UTC
Nmap scan report for betterexaminations.ie (46.137.41.29)
Host is up (0.0022s latency).
PORT    STATE SERVICE
443/tcp open  https

Nmap done: 1 IP address (1 host up) scanned in 0.05 seconds
share|improve this question
    
Define "interesting". What -do- you get? Anything? –  gparent Nov 29 '12 at 0:52
    
I mean that there's nothing related to the attempted connection in the logs –  je223 Nov 29 '12 at 0:53

1 Answer 1

up vote 2 down vote accepted

The DNS is not configured properly:

$ host -t A betterexaminations.ie
betterexaminations.ie has address 54.247.125.236

Now it seems ok:

$ host -t A betterexaminations.ie
betterexaminations.ie has address 46.137.41.29

The certificate seems ok:

$ echo ""|openssl s_client -connect 46.137.41.29:443|openssl x509 -subject -issuer -dates -noout
depth=2 C = US, O = "thawte, Inc.", OU = Certification Services Division, OU = "(c) 2006 thawte, Inc. - For authorized use only", CN = thawte Primary Root CA
verify error:num=20:unable to get local issuer certificate
verify return:0
DONE
subject= /OU=Go to https://www.thawte.com/repository/index.html/OU=Thawte SSL123 certificate/OU=Domain Validated/CN=betterexaminations.ie
issuer= /C=US/O=Thawte, Inc./OU=Domain Validated SSL/CN=Thawte DV SSL CA
notBefore=Nov 17 00:00:00 2012 GMT
notAfter=Nov 17 23:59:59 2013 GMT
share|improve this answer
1  
It was pointing to 54.247.125.236. Now it is ok. Seems that you have fixed it. –  Mircea Vutcovici Nov 29 '12 at 1:05
    
Yep just changed it. Thanks! –  je223 Nov 29 '12 at 1:18

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.