I had a similar problem. Now resolved. Using Apache.
In my case, I had a Redirect permanent in the type :80 (http) virtual host, so that ALL requests for http files were served via a type :443 (https) virtual host.
I've now changed this so that requests for two specific http files (ads.txt and favicon.ico) are excluded from redirection.
I've also reinstated an actual directory for the ads.txt and favicon.ico files.
<VirtualHost xxx.xxx.xxx.xxx:80>
ServerName example.com
ServerAlias www.example.com
DocumentRoot "/var/www/exampledirectory/html"
<Directory "/var/www/exampledirectory/html">
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{REQUEST_URI} !=/ads.txt
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule (.*) https://www.example.com/$1 [R=301,L]
</VirtualHost>
I am not sure what was the root cause of my problem but I suspect that Google requested the http version and my server response was 301 and thus not a 'standard relative path', and so, quite correctly, failed the ads.txt validation.
ads.txt
. For me it was showing missing for almost a month.