Invalid response from...on nginx

Hello,

I’m using certbot --nginx to generate ssl certificates. This is a centos server and there are 10 websites running on this machine without any problem. Even the ssl for these other websites is ok.

The error i got is the following:

Domain: livingreen.al
   Type:   unauthorized
   Detail: Invalid response from
   http://livingreen.al/.well-known/acme-    challenge/BAe0vAbHle0fBA7O07n0ITBFDmz8UCAuXRmiBxWFPJo
   [5.249.159.133]: "<!DOCTYPE html>\n\n<html class=\"no-js\"
   lang=\"en-US\">\n\n\t<head>\n\n\t\t<meta
   charset=\"UTF-8\">\n\t\t<meta name=\"viewport\"
   content=\"width=dev"
   To fix these errors, please make sure that your domain name was
   entered correctly and the DNS A/AAAA record(s) for that domain
   contain(s) the right IP address.

The config of the website is the same as the other websites which i have already generated the ssl certificate and it is the following.
This is driving me crazy!

server {
    server_name  livingreen.al www.livingreen.al;      		
	fastcgi_cache_bypass 1;		
    root /var/www/html/livingreen;
	index  index.php;

	location / {
		try_files $uri $uri/ /index.php?$args;        
	}
    
	location ~ \.php$ {
		fastcgi_split_path_info  ^(.+\.php)(/.+)$;
		fastcgi_index            index.php;			
	    fastcgi_pass             127.0.0.1:9000;
		fastcgi_cache			 livingreen;
		include                  fastcgi_params;
		fastcgi_param   PATH_INFO       $fastcgi_path_info;
		fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
	}
	
	error_log  /etc/httpd/logs/LivingErrnginx.log;
	access_log /etc/httpd/logs/LivingAccessnginx.log;
	
	# Enable ModSecurity on this website
	#modsecurity on;
	#modsecurity_rules_file /etc/nginx/modsec/main.conf;	
}

what is happening? How to troubleshoot?
https://letsdebug.net/livingreen.al/139607

thank you

1 Like

Try:

certbot certonly --webroot -w /var/www/html/livingreen \
-d livingreen.al -d www.livingreen.al

1 Like

Hi @albgen

looks like Certbot doesn’t understand your config.

What says

nginx -T
1 Like

hi Juergen,

[root@web ~]# nginx -T
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
   ...etc
1 Like

tried several times and at the end it worked. rebooted the server also… now it is ok.
No idea what happened.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.