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
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP