CentOS 7
Ads

Nginx : SSL Settings
2015/08/18
 
Enable SSL setting to use SSL connection.
[1]
[2] Configure Nginx.
[root@www ~]#
vi /etc/nginx/nginx.conf
# add into "server" section

    server {
        listen       80 default_server;
        listen       [::]:80 default_server;
        listen       443 ssl;
        server_name  www.srv.world;
        root         /usr/share/nginx/html;

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;
        ssl_ciphers ECDHE+RSAGCM:ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:!aNULL!eNull:!EXPORT:!DES:!3DES:!MD5:!DSS;
        ssl_certificate      /etc/pki/tls/certs/server.crt;
        ssl_certificate_key  /etc/pki/tls/certs/server.key;

[root@www ~]#
systemctl restart nginx

[3] If Firewalld is rinning, allow HTTPS service. HTTPS uses 443/TCP.
[root@www ~]#
firewall-cmd --add-service=https --permanent

success
[root@www ~]#
firewall-cmd --reload

success
[4] Access to the default page with HTTPS to make sure it works normally.
 
Tweet