1

I have the following nginx configuration under /etc/nginx/sites-enabled/example_com for domain example.com:

server {

    server_name example.com;

    location / {
         proxy_set_header   X-Forwarded-For $remote_addr;
         proxy_set_header   Host $http_host;
         proxy_pass         "http://127.0.0.1:3010";
         proxy_http_version 1.1;
         proxy_set_header Upgrade $http_upgrade;
         proxy_set_header Connection 'upgrade';
         proxy_set_header X-Request-Port '80';
         proxy_cache_bypass $http_upgrade;
     }

    listen [::]:443 ssl ipv6only=on; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot
   
    ssl_protocols TLSv1.2;
}server {
    if ($host = example.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen 80;
    listen [::]:80;

    server_name example.com;
    return 404; # managed by Certbot
}

When I hit example.com with Chrome I get the following message in the security tab:

This page is not secure (broken HTTPS).
Certificate - missing
This site is missing a valid, trusted certificate (net::ERR_SSL_OBSOLETE_VERSION).

Connection - obsolete connection settings
The connection to this site is encrypted and authenticated using TLS 1.0, ECDHE_RSA with P-256, and AES_256_CBC with HMAC-SHA1.
TLS 1.0 is obsolete. Enable TLS 1.2 or later.
AES_256_CBC is obsolete. Enable an AES-GCM-based cipher suite.

What I've already did:

  • nginx -t
$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
  • sudo service nginx restart and sudo service nginx reload`
  • Checked /var/log/nginx/error.log -> no errors also when hitting the domain
  • Domain points to the right server IP address. In fact, if I disable SSL it works as expected

Any idea why it tells me that I use TLSv1 when I've only the TLSv1.2enabled?

Edit:

Out of nginx -T:


http {

    ##
    # Basic Settings
    ##

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;
    # server_tokens off;

    # server_names_hash_bucket_size 64;
    # server_name_in_redirect off;

    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    ##
    # SSL Settings
    ##

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
    ssl_prefer_server_ciphers on;

    ##
    # Logging Settings
    ##

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;

    ##
    # Gzip Settings
    ##

    gzip on;
    gzip_disable "msie6";

    # gzip_vary on;
    # gzip_proxied any;
    # gzip_comp_level 6;
    # gzip_buffers 16 8k;
    # gzip_http_version 1.1;
    # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

    ##
    # Virtual Host Configs
    ##

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
}

# configuration file /etc/nginx/sites-enabled/example_com:
server {

    server_name example.com;

    location / {
         proxy_set_header   X-Forwarded-For $remote_addr;
         proxy_set_header   Host $http_host;
         proxy_pass         "http://127.0.0.1:3010";
         proxy_http_version 1.1;
         proxy_set_header Upgrade $http_upgrade;
         proxy_set_header Connection 'upgrade';
         proxy_set_header X-Request-Port '80';
         proxy_cache_bypass $http_upgrade;
     }

    listen [::]:443 ssl ipv6only=on; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot

    ssl_protocols TLSv1.2;
}server {
    if ($host = example.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen 80;
    listen [::]:80;

    server_name example.com
    return 404; # managed by Certbot
}

Edit 2: I've updated the HTTP section of nginx with ssl_protocols TLSv1.2; # Dropping SSLv3, ref: POODLE but I still get the same issue.

Edit 3 (new config):

# configuration file /etc/nginx/sites-enabled/example_com:
server {

    server_name example.com;

    location / {
         proxy_set_header   X-Forwarded-For $remote_addr;
         proxy_set_header   Host $http_host;
         proxy_pass         "http://127.0.0.1:3010";
         proxy_http_version 1.1;
         proxy_set_header Upgrade $http_upgrade;
         proxy_set_header Connection 'upgrade';
         proxy_set_header X-Request-Port '80';
         proxy_cache_bypass $http_upgrade;
     }

    listen [::]:443 ssl ipv6only=on; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot
    ssl_session_cache shared:SSL:1m; 
    ssl_session_timeout 10m;
    ssl_prefer_server_ciphers on;
     ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA HIGH !RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS";
      ssl_protocols TLSv1.2;
      ssl_dhparam /home/ubuntu/dhparams.pem;
}server {
    if ($host = example.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen 80;
    listen [::]:80;

    server_name example.com;
    return 404; # managed by Certbot


}

Additional information: OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016

11
  • First seems to be with the certificate itself which the browser is complaining not to be found.The second is related with the ciphers that are being used.you need to restrict the ciphers accepted by the server to secure ones.
    – BANJOSA
    Nov 30, 2020 at 16:55
  • @BANJOSA if I put the defaut chiphers of Letzencrypt it throw an even worse error, it will not even load the page
    – Simoyw
    Nov 30, 2020 at 17:36
  • @MichaelHampton Oh...I see the in the general HTTP section of nginx TLSv1 is enabled. That's maybe the issue. How should I change the HTTP section to disallow it?
    – Simoyw
    Nov 30, 2020 at 17:40
  • @BANJOSA if the chipers of letsencrypt are not good which one should I use? With the one of letzencrypt I get ERR_SSL_VERSION_OR_CIPHER_MISMATCH
    – Simoyw
    Nov 30, 2020 at 17:47
  • This is my usual configuration:ssl_session_cache shared:SSL:1m; ssl_session_timeout 10m; ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA HIGH !RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS"; ssl_protocols TLSv1.2; ssl_prefer_server_ciphers on; ssl_certificate /etc/nginx/ssl/nginx.crt; ssl_certificate_key /etc/nginx/ssl/nginx.key; ssl_dhparam /etc/nginx/ssl/dhparams.pem;
    – BANJOSA
    Nov 30, 2020 at 17:51

1 Answer 1

0

Today suddently it just worked. I didn't change anything. Maybe was a caching problem. I'm not sure because i've cleared browser cache several time and tried with incognito mode and firefox as well. I suppose the solution to this issue is to double check the "HTTP" section of nginx configuration to avoid unwanted override.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .