All seems well with my site on https://bejebeje.com
.
I want the same on https://www.bejebeje.com
.
The site is hosted on an Ubuntu VPS with nginx, for the certs I am using Certbot.
Here's what I did. For my site config I started with:
server {
server_name www.bejebeje.com bejebeje.com;
location / {
proxy_pass http://localhost:5010;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
I then ran certbot --nginx
and that updated my .conf
file to:
server {
server_name www.bejebeje.com bejebeje.com;
location / {
proxy_pass http://localhost:5010;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/bejebeje.com-0001/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/bejebeje.com-0001/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 = bejebeje.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name www.bejebeje.com bejebeje.com;
listen 80;
return 404; # managed by Certbot
}
Is Certbot messing up somehow? Cause the above, even after reload nginx config is giving me the following when I navigate to https://www.bejebeje.com