Hi,
I’m not sure if its coincidence, but for some reason my LE stuff isn’t working now:
curl http://www.educationusingpowerpoint.co.uk/.well-known/acme-challenge/mystringhere
I just get the website showing normally. I can see this in my nginx.ssl.conf :
include /home/willr/conf/web/educationusingpowerpoint.co.uk/nginx.ssl.conf_*;
and nginx.conf has:
include /home/willr/conf/web/educationusingpowerpoint.co.uk/nginx.conf_*;
The file exists with:
location ~ "^/\.well-known/acme-challenge/([-_A-Za-z0-9]+)$" {
default_type text/plain;
return 200 "$1.sBJkpZnBTmd073Gz0pv93Vm4zjuUERcjV5sQwGOr24Y";
}
So I’m a bit confused as to why its not working?
I only realised its not working, as I got some LE emails through saying the certificates will expire soon. I thought it was a DNS issue with the ipv6 records, but its doing the same on ipv4 as well
Thanks
Andy
eris
May 20, 2023, 8:21am
2
What template do you use?
Its a custom fork of the default template set:
#=======================================================================#
# Default Web Domain Template #
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
#=======================================================================#
server {
listen %ip%:%web_ssl_port% ssl http2;
listen [::]:%web_ssl_port% ssl http2;
server_name %domain_idn% %alias_idn%;
root %sdocroot%;
index index.shtml index.php index.html index.htm ;
access_log /var/log/nginx/domains/%domain%.log combined;
access_log /var/log/nginx/domains/%domain%.bytes bytes;
error_log /var/log/nginx/domains/%domain%.error.log error;
ssl_certificate %ssl_pem%;
ssl_certificate_key %ssl_key%;
ssl_stapling on;
ssl_stapling_verify on;
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
location / {
include %home%/%user%/conf/web/%domain%/rules.conf*;
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js|eot|otf|ttf|woff|woff2|map)$ {
rewrite "/20(\d\d)/v\d+/js/(.+)\.js$" /20$1/js/$2.js last;
rewrite "/20(\d\d)/v\d+/css/(.+)\.css$" /20$1/css/$2.css last;
rewrite "/20(\d\d)/v\d+/js/(.+)\.css$" /20$1/js/$2.css last;
rewrite "/20(\d\d)/v\d+/css/(.+)\.css\.map$" /20$1/css/$2.css.map last;
expires max;
fastcgi_hide_header "Set-Cookie";
}
location ~ [^/]\.php(/|$) {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_pass %backend_lsnr%;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
}
location ~ \.cgi$ {
gzip off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:8181;
}
}
location /error/ {
alias %home%/%user%/web/%domain%/document_errors/;
}
location ~ /\.(?!well-known\/) {
deny all;
return 404;
}
location /vstats/ {
alias %home%/%user%/web/%domain%/stats/;
include %home%/%user%/web/%domain%/stats/auth.conf*;
}
include /etc/nginx/conf.d/phpmyadmin.inc*;
include /etc/nginx/conf.d/phppgadmin.inc*;
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
}
Ahhh never mind - I found it!
To get my custom rules saved in the backups, I was experimenting with:
nginx.conf_rules
…which had all my rules in. Unfortunatly it didn’t work (as it was outside the location / {}
scope), but it looks like it got left in. It works now I’ve removed that
1 Like