Score:0

single nginx configuration failing making site unreachable

cn flag

A VPS has multiple files under sites-enabled directory.

One of these experiences failures after a certain amount of time. The logs are not very indicative to me, but these lines are representative of batches of errors:

2022/01/16 06:36:44 [crit] 738797#738797: *9702 SSL_do_handshake() failed (SSL: error:14201044:SSL routines:tls_choose_sigalg:internal error) while SSL handshaking, client: 17[obfusc], server: 0.0.0.0:443
2022/01/16 07:01:27 [crit] 738797#738797: *9716 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client: 14[obfusc], server: 0.0.0.0:443
2022/01/16 17:42:52 [info] 1309633#1309633: Using 32768KiB of shared memory for nchan in /etc/nginx/nginx.conf:63

Overall, nginx -t only complains about one line as a duplicate, but for another domain and indicates it ignores that line.
The configuration of the affected application follows

server {

  server_name third.second.ws;
  root /home/deploy/examine/current/public;

  passenger_enabled on;
  passenger_app_env development;

  location /cable {
    passenger_app_group_name myapp_websocket;
    passenger_force_max_concurrent_requests_per_process 0;
  }

  # Allow uploads up to 100MB in size
  client_max_body_size 100m;

  location ~ ^/(assets|packs) {
    expires max;
    gzip_static on;
  }


    listen 443 ssl http2;

#    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/third.second.ws/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/third.second.ws/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


}
server {
    if ($host = third.second.ws) {
        return 301 https://$host$request_uri;
    } # managed by Certbot



  server_name third.second.ws;
    listen 80;
    return 404; # managed by Certbot


}

What in the above could explain the failures of this configuration file?

djdomi avatar
za flag
Questions seeking installation, configuration or diagnostic help must include the desired end state, the specific problem or error, sufficient information about the configuration and environment to reproduce it, and attempted solutions. Questions without a clear problem statement are not useful to other readers and are unlikely to get good answers.
cn flag
I beg your pardon? `the desired end state`? The title states: `configuration failing making site unreachable` How opaque is that?
djdomi avatar
za flag
we are a professional site for business. However you missed that 3 lines from the Log is to less, please show more. have you tried to nginx -t -T
cn flag
`show more` would only result in having lines that repeat the same message but with different ips. Yes, that was also tried, but -T outputs the full config and as the original question posits `-t` does indicate an issue of a duplicate line. What do you mean by: `a professional site for business` ?
djdomi avatar
za flag
enduser questions are offtopic. Mostly for nginx is known that the error shows in the beginning. if it tells that there are duplicates then you have duplicates. check that first
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.