Please help me all of my website down

Error while running nginx -c /etc/nginx/nginx.conf -t.

nginx: [emerg] BIO_new_file("/etc/letsencrypt/live/www.xxxx.me/fullchain.pem") failed (SSL: error:02001002:system library:fopen:No su file or directory:fopen(’/etc/letsencrypt/live/www.xxxxx.me/fullchain.pem’,‘r’) error:2006D080:BIO routines:BIO_new_file:no such file
nginx: configuration file /etc/nginx/nginx.conf test failed

My domain is: weihnachtsbilder.me

I ran this command: a command to delete the ssl from one of my domain. But after this none of my website was opening…so i thought i should delete all the ssl and then reinstall all of them…so i delete all of them … after this i started facing this error …now all of my websites are down…please help me.

It produced this output: when i run " sudo nginx -t"
The nginx plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError(‘Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] BIO_new_file("/etc/letsencrypt/livwww.xxx.me/fullchain.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen(’/etc/letsencrypt/live/w.xxxx.me/fullchain.pem’,‘r’) error:2006D080:BIO routines:BIO_new_file:no such file)\nnginx: configuration file /etc/nginx/nginx.cf test failed\n’,)

My web server is (LEMP on UBUNTU 18.04):

please help me.

Hi @sonushefu,

There are two types of people, those who make backups and those who will make backups. Which one are you?.

If you are here I suppose you are the one which after this... will do backups :stuck_out_tongue:.

Right now, nginx can't start because there are SSL directives in the conf pointing to files (your certificates and keys) that nginx needs to start and it can't find them so as you deleted all of them, you need to reconfigure nginx to not use those files, and for that, you have several options but it depends on how you have configured them... so edit your conf files one by one and comment the entire server block serving the domains using port 443 and ssl. Once commented all of them you could start nginx and try to get a new cert for your domains but as I said, all this depends on how is your nginx configured.... if you are redirecting from http to https you should disable them till you can get your certificates... or you could use the dns challenge instead so you should not need to change anything but this could be a bit complicated.

What did you delete and how?.

Cheers,
sahsanu

1 Like

Thankssssss…a lot SIR g…

I understood sir… and yes now i will do backups…

1 Like

Hello Sir g…as you said i changed every block to default configuration, and allow the port 80…

but when i run sudo nginx -t…i got this…
nginx: [emerg] BIO_new_file("/etc/letsencrypt/live/www.weihnachtsbilder.me/fullchain.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen(’/etc/letsencrypt/live/www.weihnachtsbilder.me/fullchain.pem’,‘r’) error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/ng
inx.conf test failed

please sir help me…my all websites are down… :sob::sob:

Hi @sonushefu,

As the error says, you have ssl directives in your file /etc/nginx/nginx.conf yet so you need to comment them out there too.

Cheers,
sahsanu

Sir g this is my /etc/nginx/nginx.conf

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
worker_connections 768;
# multi_accept on;
}

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_vary on;
     gzip_proxied any;
     gzip_comp_level 6;
     gzip_buffers 16 8k;
     gzip_min_length 1000;
     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/*;

}

#mail {

# See sample authentication script at:

# http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript

# auth_http localhost/auth.php;

# pop3_capabilities “TOP” “USER”;

# imap_capabilities “IMAP4rev1” “UIDPLUS”;

server {

listen localhost:110;

protocol pop3;

proxy on;

@sonushefu, as you have there the includes you need to find the right file that is still using.

grep -ri 'www.weihnachtsbilder.me/fullchain.pem' /etc/nginx/*

Kee p in mind that you will get also the files where you commented that line so you need to find the file that you didn’t edited yet

Okay sir g… I am trying… :sleepy::tired_face:

Finaalllllyyyy…problem solved sir g… Thanksssssssssssss…a lot :heart_eyes::heart_eyes:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.