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 have configured nginx for port 80 and 443, with 443 containing an ssl cert configuration. When I restart nginx, no errors occur, so I don't believe it's a cert issue, but of course I could be wrong.

But, when I load

https://picantewsdev.hotsalsainteractive.com/logo/game/1f126552-9ac4-4db2-b7ce-cede6f38f7ea/ef0c3db2-7cf8-4dc3-bada-625c77cdff80

I get "page cannot be displayed..." browser message. And, I'm not even seeing the request hit the server.

But if I load

http://picantewsdev.hotsalsainteractive.com/logo/game/1f126552-9ac4-4db2-b7ce-cede6f38f7ea/ef0c3db2-7cf8-4dc3-bada-625c77cdff80

The request makes it to the server (albeit a 500 error but that's fine for now).

Any ideas?

We are not behind a load balancer. This is a server hosted on Rackspace. There's no hardware firewall or anything like that, either.

Here is the nginx config:

server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;

    root /usr/share/nginx/html/public;
    index index.php index.html index.htm;

    server_name picantewsdev.hotsalsainteractive.com;

    location / {
            try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ .php$ {
            fastcgi_split_path_info ^(.+.php)(/.+)$;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
            # add the following line in for added security.
            try_files $uri =403;
    }
}

server {
    listen 443;
    listen [::]:443 default_server ipv6only=on;

    root /usr/share/nginx/html/public;
    index index.php index.html index.htm;

    ssl on;
    ssl_certificate /etc/nginx/ssl_cert/star.hotsalsainteractive.com.chained.crt;
    ssl_certificate_key /etc/nginx/ssl_cert/star_hotsalsainteractive_com.key;

    ssl_session_timeout 5m;

    ssl_protocols SSLv3 TLSv1;
    ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
    ssl_prefer_server_ciphers on;

    server_name picantewsdev.hotsalsainteractive.com;

    location / {
            try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ .php$ {
            fastcgi_split_path_info ^(.+.php)(/.+)$;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
            # add the following line in for added security.
            try_files $uri =403;
    }
}

Any help would be appreciated.

Thanks!

share|improve this question

2 Answers 2

up vote 0 down vote accepted

You need to add ssl to the listen directive like this:

listen 443 ssl;

The ssl on; directive is for old nginx versions, and it might not be supported anymore. The format above is the current method of applying SSL to a vhost.

share|improve this answer
    
Thank you! This solved it. –  kambythet Mar 4 at 0:35

Your machine isn't accepting connections on port 443. That's why the http link works and the https link doesn't.

This may be because you didn't reload nginx after making the configuration change, or because you didn't open port 443 in your firewall(s).

share|improve this answer

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.