2016-05-26 12 views
0

httpとhttpsでアプリケーションを実行しようとしています。アプリケーションは静的なhtmlをcss 'とjs'と共にレンダリングします。私はページを提供するためにnginxを使用します。私は自分のnginx設定を構成しましたが、ページはhttpsで表示されません。NGINX Httpsを設定する

私がhttp://subdomain.example.comにヒットしたとき、それはうまく動作します!

ただし、https://subdomain.example.comになると、ChromeでCONNECTION_RESETまたはCONNECTION_CLOSEDエラーが発生します。

server { 
    listen  80; 
    server_name subdomain.example.com; 

    #charset koi8-r; 
    #access_log /var/log/nginx/log/host.access.log main; 

    location/{ 
     root /var/www/html/htmls/; 
     index entergmat.html; 
    } 
} 

server{ 
    listen    443 ssl; 
    ssl     on; 
    server_name   subdomain.example.com; 
    ssl_certificate  /path/to/certificate.crt; 
    ssl_certificate_key /path/to/certificate.key; 
# ssl_protocols  TLSv1 TLSv1.1 TLSv1.2; 
# ssl_ciphers   HIGH:!aNULL:!MD5; 
    keepalive_timeout 70; 

    location/{ 
     root /var/www/html/htmls/; 
     index entergmat.html; 
    } 
} 

リクエストこの上のあなたの助け:

以下は私の構成です。

ありがとうございます!

答えて

0

私はあなたの設定からssl on;を削除することをお勧め:

Listenディレクティブ の代わりに、このディレクティブのSSLパラメータを使用することをお勧めします。 nginxのドキュメントから

http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl

+0

それだけでなく、まだ運をやっていないしようとしました。 –

+0

証明書を作成するときに適切なサイトドメインを提供していますか? – Eugene

+0

https://miqadev.egmatcdn.com/これはhttpsではなくhttpで動作します –