Sign up ×
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, I get connection refused, but when I try by the ip, it works fine, (https://)

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/;

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;
                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/;
                ssl_verify_depth 3;


        server {
                listen 80;
                root /var/rails/papers/public/;
                passenger_enabled on;

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

Any ideas?


nmap -sT -r -n -p443


Starting Nmap 5.21 ( ) at 2012-11-29 01:01 UTC
Nmap scan report for (
Host is up (0.0022s latency).
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 has address

Now it seems ok:

$ host -t A has address

The certificate seems ok:

$ echo ""|openssl s_client -connect|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
subject= /OU=Go to SSL123 certificate/OU=Domain Validated/
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
It was pointing to 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


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.