Server Fault Asked by Josh Kirby on January 3, 2022
I have a nginx server (1.10) and I am trying to access a certain location block for letsecnrypt but having no luck. I have modsecurity and pagespeed both included in my compiled nginx.
OS is Ubuntu 16.04 LTS
My error message I get is `An error occurred.
Sorry, the page you are looking for is currently unavailable.
Please try again later.
If you are the system administrator of this resource then you should check the error log for details.
Faithfully yours, nginx.
Here is my nginx location block:
location ~* /.well-known {
root /work-disk/www;
try_files $uri $uri/ @other_node; #@other_node is another location block to handle passing requests to my second server that I can no remove
# access_log off;
pagespeed off;
ModSecurityEnabled off;
}
I have so far checked /var/log/nginx/error.log
and /var/log/messages
both of which show nothing pointing to anything. The former shows logs about the process and the latter shows a blank file.
EDIT**
Just gave allow all;
a try and same error.
Zero clue what was wrong but asked a senior coworker for permission to rebuild the VM and got told to use ./certbot-auto certonly -n --webroot -w /work-disk/www -d <mydomain.com> --agree-tos --email <our ssl email>
I am not 100% on why this worked but I think it has to do with the certonly
part.
Answered by Josh Kirby on January 3, 2022
You should use simple prefix matching here:
location /.well-known {
...
}
You need also make sure that /work-disk/www/.well-known
directory exists, because that is where nginx is looking for the resources for requests to /.well-known
URI.
Answered by Tero Kilkanen on January 3, 2022
3 Asked on January 1, 2021 by user14108508
0 Asked on December 31, 2020 by xdg
1 Asked on December 31, 2020 by qneville
0 Asked on December 31, 2020 by dimitri-l
1 Asked on December 30, 2020 by pansal
1 Asked on December 30, 2020 by dagda1
2 Asked on December 30, 2020 by hellb0y77
1 Asked on December 30, 2020 by patrick-hund
0 Asked on December 29, 2020 by pairwiseseq
0 Asked on December 29, 2020 by shahrear-bin-amin
1 Asked on December 29, 2020 by mpen
3 Asked on December 29, 2020 by amanahumpa
3 Asked on December 28, 2020 by timanderson
1 Asked on December 28, 2020 by mgutt
1 Asked on December 28, 2020
0 Asked on December 27, 2020 by andrey-salnikov
2 Asked on December 27, 2020 by jason-cohen
1 Asked on December 27, 2020
1 Asked on December 27, 2020 by neel
Get help from others!
Recent Questions
Recent Answers
© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP