Error: Let's Encrypt validation status 400 at my subdomain

Hi there,
Im trying to Enable SSL for my subdomain which is at another ip but Im getting an error

Error: Let's Encrypt validation status 400 (storage.tech-portal.me). Details: 403:"89.168.116.123: Invalid response from http://storage.tech-portal.me/.well-known/acme-challenge/saK3BMaTrrmAa5bS7INJoZWZ8hW-hVAQz18BL3eCqhY: 404"

Any idea what Im doing wrong ?

Shows the default /var/www/html page instead under construction so that is the issue

@eris so what should I do ? What to change ?
Edit: Ok I tried changing to /home/storage/web/storage.tech-portal.me/public_html/
but still Im getting .html from /var/www/html/ ??

@sahsanu can you help, please ? Sorry for pinging you like this :slight_smile:

Show the output of these commands:

v-list-web-domain storage storage.tech-portal.me json
cat /home/storage/conf/web/storage.tech-portal.me/nginx.conf_letsencrypt
cat /home/storage/conf/web/storage.tech-portal.me/nginx.conf
cat /home/storage/conf/web/storage.tech-portal.me/nginx.ssl.conf

@sahsanu

v-list-web-domain storage storage.tech-portal.me json

# v-list-web-domain storage storage.tech-portal.me json
{
    "storage.tech-portal.me": {
        "IP": "10.0.0.106",
        "IP6": "",
        "DOCUMENT_ROOT": "/home/storage/web/storage.tech-portal.me/public_html/",
        "U_DISK": "1",
        "U_BANDWIDTH": "0",
        "TPL": "default",
        "ALIAS": "",
        "STATS": "",
        "STATS_USER": "",
        "SSL": "no",
        "SSL_FORCE": "no",
        "SSL_HSTS": "",
        "SSL_HOME": "same",
        "LETSENCRYPT": "no",
        "FTP_USER": "",
        "FTP_PATH": "",
        "AUTH_USER": "",
        "BACKEND": "default",
        "PROXY": "default",
        "PROXY_EXT": "css,htm,html,js,mjs,json,xml,apng,avif,bmp,cur,gif,ico,jfif,jpg,jpeg,pjp,pjpeg,png,svg,tif,tiff,webp,aac,caf,flac,m4a,midi,mp3,ogg,opus,wav,3gp,av1,avi,m4v,mkv,mov,mpg,mpeg,mp4,mp4v,webm,otf,ttf,woff,woff2,doc,docx,odf,odp,ods,odt,pdf,ppt,pptx,rtf,txt,xls,xlsx,7z,bz2,gz,rar,tar,tgz,zip,apk,appx,bin,dmg,exe,img,iso,jar,msi,webmanifest",
        "FASTCGI_CACHE": "no",
        "FASTCGI_DURATION": "0s",
        "REDIRECT": "",
        "REDIRECT_CODE": "",
        "CUSTOM_DOCROOT": "",
        "SUSPENDED": "no",
        "TIME": "01:42:17",
        "DATE": "2025-06-13"
    }
}

cat /home/storage/conf/web/storage.tech-portal.me/nginx.conf_letsencrypt

location ~ "^/\.well-known/acme-challenge/([-_A-Za-z0-9]+)$" {
    default_type text/plain;
    return 200 "$1.MxoTs9C8tM05x-VSSgIaSeSv1_eX82rb9zyCfHCEwkY";

cat /home/storage/conf/web/storage.tech-portal.me/nginx.conf

#=========================================================================#
# Default Web Domain Template                                             #
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS   #
# https://hestiacp.com/docs/server-administration/web-templates.html      #
#=========================================================================#

server {
	listen      10.0.0.106:80;
	server_name storage.tech-portal.me ;
	error_log   /var/log/apache2/domains/storage.tech-portal.me.error.log error;

	include /home/storage/conf/web/storage.tech-portal.me/nginx.forcessl.conf*;

	location ~ /\.(?!well-known\/|file) {
		deny all;
		return 404;
	}

	location / {
		proxy_pass http://10.0.0.106:8080;

		location ~* ^.+\.(css|htm|html|js|mjs|json|xml|apng|avif|bmp|cur|gif|ico|jfif|jpg|jpeg|pjp|pjpeg|png|svg|tif|tiff|webp|aac|caf|flac|m4a|midi|mp3|ogg|opus|wav|3gp|av1|avi|m4v|mkv|mov|mpg|mpeg|mp4|mp4v|webm|otf|ttf|woff|woff2|doc|docx|odf|odp|ods|odt|pdf|ppt|pptx|rtf|txt|xls|xlsx|7z|bz2|gz|rar|tar|tgz|zip|apk|appx|bin|dmg|exe|img|iso|jar|msi|webmanifest)$ {
			try_files  $uri @fallback;

			root       /home/storage/web/storage.tech-portal.me/public_html;
			access_log /var/log/apache2/domains/storage.tech-portal.me.log combined;
			access_log /var/log/apache2/domains/storage.tech-portal.me.bytes bytes;

			expires    max;
		}
	}

	location @fallback {
		proxy_pass http://10.0.0.106:8080;
	}

	location /error/ {
		alias /home/storage/web/storage.tech-portal.me/document_errors/;
	}

	include /home/storage/conf/web/storage.tech-portal.me/nginx.conf_*;
}

cat /home/storage/conf/web/storage.tech-portal.me/nginx.ssl-conf


cat: /home/storage/conf/web/storage.tech-portal.me/nginx.ssl-conf: No such file or directory

My bad, the file is /home/storage/conf/web/storage.tech-portal.me/nginx.ssl.conf

Anyway, those conf files look fine.

nginx -t
systemctl restart nginx
systemctl status nginx --no-pager -l
# cat /home/storage/conf/web/storage.tech-portal.me/nginx.conf
#=========================================================================#
# Default Web Domain Template                                             #
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS   #
# https://hestiacp.com/docs/server-administration/web-templates.html      #
#=========================================================================#

server {
	listen      10.0.0.106:80;
	server_name storage.tech-portal.me ;
	error_log   /var/log/apache2/domains/storage.tech-portal.me.error.log error;

	include /home/storage/conf/web/storage.tech-portal.me/nginx.forcessl.conf*;

	location ~ /\.(?!well-known\/|file) {
		deny all;
		return 404;
	}

	location / {
		proxy_pass http://10.0.0.106:8080;

		location ~* ^.+\.(css|htm|html|js|mjs|json|xml|apng|avif|bmp|cur|gif|ico|jfif|jpg|jpeg|pjp|pjpeg|png|svg|tif|tiff|webp|aac|caf|flac|m4a|midi|mp3|ogg|opus|wav|3gp|av1|avi|m4v|mkv|mov|mpg|mpeg|mp4|mp4v|webm|otf|ttf|woff|woff2|doc|docx|odf|odp|ods|odt|pdf|ppt|pptx|rtf|txt|xls|xlsx|7z|bz2|gz|rar|tar|tgz|zip|apk|appx|bin|dmg|exe|img|iso|jar|msi|webmanifest)$ {
			try_files  $uri @fallback;

			root       /home/storage/web/storage.tech-portal.me/public_html;
			access_log /var/log/apache2/domains/storage.tech-portal.me.log combined;
			access_log /var/log/apache2/domains/storage.tech-portal.me.bytes bytes;

			expires    max;
		}
	}

	location @fallback {
		proxy_pass http://10.0.0.106:8080;
	}

	location /error/ {
		alias /home/storage/web/storage.tech-portal.me/document_errors/;
	}

	include /home/storage/conf/web/storage.tech-portal.me/nginx.conf_*;
}

nginx -t

# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

systemctl restart nginx

# systemctl restart nginx
Warning: The unit file, source configuration file or drop-ins of nginx.service changed on disk. Run 'systemctl daemon-reload' to reload units.

systemctl status nginx --no-pager -l

nginx.service - nginx - high performance web server
     Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; preset: enabled)
     Active: active (running) since Fri 2025-06-13 11:56:24 UTC; 52s ago
       Docs: https://nginx.org/en/docs/
    Process: 92356 ExecStart=/usr/sbin/nginx -c ${CONFFILE} (code=exited, status=0/SUCCESS)
   Main PID: 92359 (nginx)
      Tasks: 5 (limit: 1086)
     Memory: 6.6M (peak: 6.9M)
        CPU: 66ms
     CGroup: /system.slice/nginx.service
             β”œβ”€92359 "nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf"
             β”œβ”€92360 "nginx: worker process"
             β”œβ”€92361 "nginx: worker process"
             β”œβ”€92362 "nginx: cache manager process"
             └─92363 "nginx: cache loader process"

Jun 13 11:56:24 hcp.tech-portal.me systemd[1]: Starting nginx.service - nginx - high performance web server...
Jun 13 11:56:24 hcp.tech-portal.me systemd[1]: Started nginx.service - nginx - high performance web server.
Warning: The unit file, source configuration file or drop-ins of nginx.service changed on disk. Run 'systemctl daemon-reload' to reload units.
systemctl daemon-reload
systemctl restart nginx

@sahsanu
Nope still getting page from /var/www/html

Should I delete this VM and start from fresh install ?

If you don’t know the root cause, you might get the same result.

I’ll send you a private message.

Just for the record:

The problem was that the subdomain was using a CNAME record pointing to the main domain, which was using a different IP. Once the CNAME was deleted and an A record with the correct IP was created, the issue was resolved.

3 Likes

Thanks to @sahsanu its solved now