Answer the question
In order to leave comments, you need to log in
Problem with .well-known: The client lacks sufficient authorization?
Install SSL Letsencrypt. VPS, nginx, node.js application. The domain is connected.
File /etc/nginx/sites-available/default:
server {
listen 80;
server_name мойсайт.com;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
}
location ~ /.well-known {
allow all;
}
}
sudo letsencrypt certonly -a webroot --webroot-path=/home/ubuntu/папка-с-node -d example.com -d www.example.com
throws an errorurn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://мойсайт/.well-known/acme-challenge/eALeSHOVkIaPXeeBwi1nlSOAG5Lt328xWcx2zShgRYU: "<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>"
Answer the question
In order to leave comments, you need to log in
specify root for location ~ /.well-known {
and in general it is better to replace it withlocation /.well-known {
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question