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.

I try to get my vhost working with my SSL cert on Nginx.

I just get error 102 connection refused when i try to access the site!

 server {
    listen   80;
    root /var/storage/linusodenring.se/www;
    index index.php index.html index.htm;
    server_name linusodenring.se www.linusodenring.se;
location ~ \.php$ {
            try_files $uri =404;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            include fastcgi_params;
    }

    location ~ /\.ht {
            deny all;
    }

}

 server {
 listen   443;
    root /var/storage/linusodenring.se/www;
    index index.php index.html index.htm;
    server_name linusodenring.se;
 ssl on;
    ssl_certificate /secret/ssl_linusodenring.se/linusodenringse.crt;
    ssl_certificate_key /secret/ssl_linusodenring.se/linusodenringse.key;
keepalive_timeout        50;
location ~ \.php$ {
            try_files $uri =404;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            include fastcgi_params;
    }

    location ~ /\.ht {
            deny all;
    }

}

My vhost config! Notice they are in the same file just Serverfault that is bugged!

share|improve this question
    
What is output of nginx -t. Did you restart you nginx process? Did you check nginx error.log file? –  AlexD Apr 20 '13 at 11:11
add comment

1 Answer 1

up vote 0 down vote accepted

I installed SSL in Nginx and had it working on the first try by following the Ars Technica article Web served, part 2: Securing things with SSL/TLS.

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.