Failed redirect

Please send me that file.

Well that showed nothing :frowning:
And I meant for you to send it to me via PM (not posted for all to see).

Let's try making a file in the root path:
echo Z > /var/www/matthewalbertcole.com/Test-File-4321

ok done (and deleted the error.log reply)

OK that one works!:

curl http://matthewalbertcole.com/Test-File-4321
Z

So there must be some permissions issues with those subdirectories.
Let's compare outputs:
ls -l /var/www/matthewalbertcole.com/Test-File-4321
with
ls -l /var/www/matthewalbertcole.com/.well-known
or maybe
ls -la /var/www/matthewalbertcole.com/ | grep dr

ok, lots of differences there it seems:

root@nodejs-s-1vcpu-1gb-nyc3-01:~/matthewalbertcole.com# ls -l /var/www/matthewalbertcole.com/Test-File-4321
-rw-r--r-- 1 root root 2 Oct 15 04:41 /var/www/matthewalbertcole.com/Test-File-4321
root@nodejs-s-1vcpu-1gb-nyc3-01:~/matthewalbertcole.com# 
root@nodejs-s-1vcpu-1gb-nyc3-01:~/matthewalbertcole.com# ls -l /var/www/matthewalbertcole.com/.well-known
total 4
drwxr-xr-x 2 root root 4096 Oct 15 03:53 acme-challenge

hmm...
Both are "root root"

Do you use ".htaccess" files?
Do you somehow block files that start with "." ?

no I don't that I'm aware of for either question

Well the file "Type" is the same.
The root path works...
The longer path (with .well-known/acme-challenge in it) fails...

hmm... indeed!

what do?

Let's try one folder deeper two ways:

  • one with a leading dot
    mkdir /var/www/matthewalbertcole.com/.A
    echo A > /var/www/matthewalbertcole.com/.A/Test-File-A

  • one without a dot
    mkdir /var/www/matthewalbertcole.com/B
    echo B > /var/www/matthewalbertcole.com/B/Test-File-B

If one works, then we have a clue.
If both fail... then I give up! - LOL

http://matthewalbertcole.com/.A/Test-File-A
http://matthewalbertcole.com/B/Test-File-B

root@nodejs-s-1vcpu-1gb-nyc3-01:~/matthewalbertcole.com# mkdir /var/www/matthewalbertcole.com/.A
root@nodejs-s-1vcpu-1gb-nyc3-01:~/matthewalbertcole.com# echo A > /var/www/matthewalbertcole.com/.A/Test-File-A
root@nodejs-s-1vcpu-1gb-nyc3-01:~/matthewalbertcole.com# mkdir /var/www/matthewalbertcole.com/B
root@nodejs-s-1vcpu-1gb-nyc3-01:~/matthewalbertcole.com# echo B > /var/www/matthewalbertcole.com/B/Test-File-B

What if they both work? lol

You've jinked it - LOL

curl http://matthewalbertcole.com/.A/Test-File-A
A

curl http://matthewalbertcole.com/B/Test-File-B
B

I'm soooo confused right now... I need a :beer:

We can only continue forward and see where it leads us...
echo W > /var/www/matthewalbertcole.com/.well-known/Test-File-W
echo C > /var/www/matthewalbertcole.com/.well-known/acme-challenge/Test-File-C

http://matthewalbertcole.com/.well-known/Test-File-W
http://matthewalbertcole.com/.well-known/acme-challenge/Test-File-C

Maybe we (meaning me) just misspelled something previously... :crossed_fingers:
[it is 1:30 am here...]

ok, they both work so I guess there was a typo somewhere

curl http://matthewalbertcole.com/.well-known/acme-challenge/Test-File-C
C

Ok now the world makes sense (again - LOL).

Time to "tidy up":
rm -R /var/www/matthewalbertcole.com/Test-File-*
rm -R /var/www/matthewalbertcole.com/.A
rm -R /var/www/matthewalbertcole.com/B

Try:

certbot certonly \
--webroot -w /var/www/matthewalbertcole.com \
-d matthewalbertcole.com \
-d www.matthewalbertcole.com \
--dry-run

It's right there!
"TYPO" = The "-1234" was left out.

root@nodejs-s-1vcpu-1gb-nyc3-01:~/matthewalbertcole.com# certbot certonly \
> --webroot -w /var/www/matthewalbertcole.com \
> -d matthewalbertcole.com \
> -d www.matthewalbertcole.com \
> --dry-run
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Simulating renewal of an existing certificate for matthewalbertcole.com and www.matthewalbertcole.com
The dry run was successful.

ahhh ok that explains it