My certificate is expired, I need to extend it

Yes but the two things are in one config file(/etc/nginx/sites-enabled/stixex.io)
And it is same as admin.stixex.io

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name stixex.io www.stixex.io;

    include acme; # Letsencrypt webroot

    access_log /var/log/nginx/stixex.io/nginx_access.log;
    error_log /var/log/nginx/stixex.io/nginx_error.log;

    ssl_certificate /etc/letsencrypt/live/stixex.io/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/stixex.io/privkey.pem;
    include /etc/nginx/options-ssl-nginx.conf;

    location / {
        root /home/ubuntu/stixex/dist;
        index index.html;
    }

#    location / {
#        include proxy_params;
#        proxy_pass      http://127.0.0.1:3020;
#    }

}

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name api.stixex.io;

    include acme; # Letsencrypt webroot

    access_log /var/log/nginx/api.stixex.io/nginx_access.log;
    error_log /var/log/nginx/api.stixex.io/nginx_error.log;

    ssl_certificate /etc/letsencrypt/live/api.stixex.io/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/api.stixex.io/privkey.pem;
    include /etc/nginx/options-ssl-nginx.conf;

    location / {
        include proxy_params;
        proxy_pass      http://127.0.0.1:7000;
    }

}

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name admin.stixex.io;

    include acme; # Letsencrypt webroot

    access_log /var/log/nginx/admin.stixex.io/nginx_access.log;
    error_log /var/log/nginx/admin.stixex.io/nginx_error.log;

    ssl_certificate /etc/letsencrypt/live/admin.stixex.io/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/admin.stixex.io/privkey.pem;
    include /etc/nginx/options-ssl-nginx.conf;

    location / {
        root /home/ubuntu/admin_panel/dist;
        index index.html;
    }

}


server {
    listen 80;
    listen [::]:80;

    server_name stixex.io www.stixex.io admin.stixex.io api.stixex.io;

    include acme; # Letsencrypt webroot

    return 301 https://$host$request_uri;

}

And yet, this code isn't being executed:

Not for http://api.stixex.io

Have you restarted nginx (since last change)?

2 Likes

See the different responses I get:

curl -Iki http://api.stixex.io
HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Date: Thu, 10 Jun 2021 00:47:44 GMT
Content-Type: text/html
Content-Length: 1637
Last-Modified: Tue, 08 Jun 2021 12:04:50 GMT
Connection: keep-alive
ETag: "60bf5ce2-665"
Accept-Ranges: bytes

curl -Iki http://www.stixex.io
HTTP/1.1 301 Moved Permanently
Server: nginx/1.18.0 (Ubuntu)
Date: Thu, 10 Jun 2021 00:48:41 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: https://www.stixex.io/
1 Like

I just restart the nginx and I see this

C:\Users\AKMA>curl -Iki http://api.stixex.io
HTTP/1.1 301 Moved Permanently
Server: nginx/1.18.0 (Ubuntu)
Date: Thu, 10 Jun 2021 01:00:54 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: https://api.stixex.io/

1 Like

Oh Thanks

Now it works fine now

I am very very thanks for your help

:slight_smile: :slight_smile: :slight_smile:

2 Likes

Now the both url works fine.

I have a question:
How can I check and change the current renewal reminders email?
I need to change with my email instead of last developer's email

1 Like

There is no way to check.
You can update the registered email address within the renewal request:
certbot {whatever you need here... and add}
image

1 Like