• Uncategorized

About linux : Error-after-upgrading-nginx-to-nginx-version-1216-on-ubuntu-18

Question Detail

I’m getting following error after upgrading nginx from 1.14 to 1.21.6

I’m getting following error

Error: Server Error
The server encountered a temporary error and could not complete your request.
Please try again in 30 seconds.

Here is my nginx.conf file

[email protected]:/etc/nginx$ cat nginx.conf

user  nginx;
worker_processes  auto;

error_log  /var/log/nginx/error.log notice;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


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

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;
}

and web config file

[email protected]:/etc/nginx$ cat sites-available/web

  location / {
    proxy_pass          http://127.0.0.1:8080;
    proxy_set_header    Host $http_host;
    proxy_read_timeout  180s;
  }

  location = /robots.txt  { access_log off; log_not_found off; }
  location = /favicon.ico { access_log off; log_not_found off; }

  location = /500.html {
    root /var/www/maint;
  }
  location = /404.html {
    root /var/www/maint;
  }

  include snippets/real_ip.conf;
  server_tokens off;

  ssl_certificate /etc/nginx/ssl/www-master.acm-review.com.crt;
  ssl_certificate_key /etc/nginx/ssl/www-master.acm-review.com.key;

  ssl_session_cache shared:SSL:10m;
  ssl_session_timeout 1h;
  ssl_session_tickets on;

  # https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility
  ssl_protocols TLSv1.2;
  ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
  ssl_prefer_server_ciphers on;

  ssl_dhparam /etc/nginx/ssl/dhparam.pem;

  add_header X-Content-Type-Options nosniff;

  resolver 8.8.8.8 8.8.4.4;
}

I have only error.log and access.log file under log directory. web.access.log and web.error.log have not generated as mentioned in web config file

[email protected]:/etc/nginx$ cd /var/log/nginx/
[email protected]:/var/log/nginx$ ls
access.log  error.log

But error.log file has following logs

[email protected]:/var/log/nginx$ cat error.log
2022/04/08 10:20:20 [notice] 7975#7975: using the "epoll" event method
2022/04/08 10:20:20 [notice] 7975#7975: nginx/1.21.6
2022/04/08 10:20:20 [notice] 7975#7975: built by gcc 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
2022/04/08 10:20:20 [notice] 7975#7975: OS: Linux 5.4.0-1069-gcp
2022/04/08 10:20:20 [notice] 7975#7975: getrlimit(RLIMIT_NOFILE): 1024:4096
2022/04/08 10:20:20 [notice] 7984#7984: start worker processes
2022/04/08 10:20:20 [notice] 7984#7984: start worker process 7985
2022/04/08 10:21:00 [notice] 7984#7984: signal 15 (SIGTERM) received from 8064, exiting
2022/04/08 10:21:00 [notice] 7985#7985: exiting
2022/04/08 10:21:00 [notice] 7985#7985: exit
2022/04/08 10:21:00 [notice] 7984#7984: signal 15 (SIGTERM) received from 1, exiting
2022/04/08 10:21:00 [notice] 7984#7984: signal 17 (SIGCHLD) received from 7985
2022/04/08 10:21:00 [notice] 7984#7984: worker process 7985 exited with code 0
2022/04/08 10:21:00 [notice] 7984#7984: exit
2022/04/11 09:47:36 [notice] 966#966: using the "epoll" event method
2022/04/11 09:47:36 [notice] 966#966: nginx/1.21.6
2022/04/11 09:47:36 [notice] 966#966: built by gcc 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
2022/04/11 09:47:36 [notice] 966#966: OS: Linux 5.4.0-1069-gcp
2022/04/11 09:47:36 [notice] 966#966: getrlimit(RLIMIT_NOFILE): 1024:4096
2022/04/11 09:47:36 [notice] 969#969: start worker processes
2022/04/11 09:47:36 [notice] 969#969: start worker process 970
2022/04/11 09:48:05 [notice] 969#969: signal 1 (SIGHUP) received from 2671, reconfiguring
2022/04/11 09:48:05 [notice] 969#969: reconfiguring
2022/04/11 09:48:05 [notice] 969#969: using the "epoll" event method
2022/04/11 09:48:05 [notice] 969#969: start worker processes
2022/04/11 09:48:05 [notice] 969#969: start worker process 2675
2022/04/11 09:48:05 [notice] 970#970: gracefully shutting down
2022/04/11 09:48:05 [notice] 970#970: exiting
2022/04/11 09:48:05 [notice] 970#970: exit
2022/04/11 09:48:05 [notice] 969#969: signal 17 (SIGCHLD) received from 970
2022/04/11 09:48:05 [notice] 969#969: worker process 970 exited with code 0
2022/04/11 09:48:05 [notice] 969#969: signal 29 (SIGIO) received

Here is my directory contained inside /etc/nginx where I don’t see site-enabled directory

[email protected]:/etc/nginx$ ls
conf.d  fastcgi_params  mime.types  modules  nginx.conf  scgi_params  sites-available  snippets  ssl  uwsgi_params
[email protected]:/etc/nginx$

Question Answer

No answer for now.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.