Install ssl on strapi one-click digital ocean

Hello, I have strapi one-click app and I want to make it https. What I do is :

  1. How To Secure Nginx with Let's Encrypt on Ubuntu 20.04 | DigitalOcean
  2. replace name_server with my subdomain at “/etc/nginx/sites-available/strapi.conf”
  3. replace URL with my subdomain at “/srv/strapi/strapi-development/config/server.js”

but it cause this”(look at the url)
(should be and I try to open and this is what happened

Can you guys help me?

Can you share the nginx config and ./config/server.js files. Have you Please make sure to delete private things from configs before sharing them. As it seems that you misconfigured them.

here is my server.js file

module.exports = ({ env }) => ({
     host: env('HOST', ''),
     port:'PORT', 1337),
     url: "my subdomain",
     admin: {
       auth: {
       secret: env('ADMIN_JWT_SECRET'),

/etc/nginx/sites-available/strapi.conf file

server {

# Listen HTTP
    listen 80;
    server_name my subdomain;

# Proxy Config
    location / {
        proxy_pass http://strapi;
        proxy_http_version 1.1;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Host $http_host;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_pass_request_headers on;

Seems ok,

Just a few questions to be sure,

Is it defined with ‘http://’ part: ‘’ (It should include it)

Is the server_name defined as ‘’ ? Without the http:// part? (it should be without it)

Have you rebuilt the Admin UI after changing the URL in server.js?

It Works! Thankyou @sunnyson