My domain is: ubccoursenotify.com
My web server is (include version): Ubuntu 21.10.0
The operating system my web server runs on is (include version): Linux
My hosting provider, if applicable, is: LINODE
I can login to a root shell on my machine (yes or no, or I don't know): YES
I'm using a control panel to manage my site (no, or provide the name and version of the control panel): NO
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot): certbot docker images "latest"
Hey guys,
I'm following this guide: Nginx and Let’s Encrypt with Docker in Less Than 5 Minutes | by Philipp | Medium
and have done the following:
- Created my docker-compose.yml file
version: "3"
services:
web:
image: weswwn/project-notify:1.9
ports:
- "8080:8080"
nginx:
image: nginx:latest
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
ports:
- "80:80"
- "443:443"
volumes:
- ./data/nginx:/etc/nginx/conf.d
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/cerbot
certbot:
image: certbot/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
- Created my nginx
app.conf
file (which lives indata/nginx/app.conf
):
server {
listen 80;
server_name ubccoursenotify.com;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
server_name ubccoursenotify.com;
ssl_certificate /etc/letsencrypt/live/ubccoursenotify.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ubccoursenotify.com/privkey.pem;
location / {
proxy_pass http://ubccoursenotify.com; #for demo purposes
}
}
- Installed the
letsencrypt
script in the guide that i'm following and ran it.
I'm running into this problem:
Domain: ubccoursenotify.com
Type: unauthorized
Detail: Invalid response from http://ubccoursenotify.com/.well-known/acme-challenge/X4BbLw2SHhFegVgbN4B4GLunf2oI8aBiqdLiYpxVqQk [2600:3c01::f03c:93ff:fe9b:e23f]: 404
Domain: www.ubccoursenotify.com
Type: unauthorized
Detail: Invalid response from http://www.ubccoursenotify.com/.well-known/acme-challenge/t0JiAtsg4FWldYLcqQtwDw4JEjv-I_vtC8-Ek8qAqAs [2600:3c01::f03c:93ff:fe9b:e23f]: 404
Hint: The Certificate Authority failed to download the temporary challenge files created by Certbot. Ensure that the listed domains serve their content from the provided --webroot-path/-w and that files created there can be downloaded from the internet.
Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
### Reloading nginx ...
2022/03/29 00:56:37 [emerg] 11#11: cannot load certificate "/etc/letsencrypt/live/ubccoursenotify.com/fullchain.pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/letsencrypt/live/ubccoursenotify.com/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/ubccoursenotify.com/fullchain.pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/letsencrypt/live/ubccoursenotify.com/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
My domains are set up as the following:
Please help!!