Solved After change hostname fail generation of host certificate

castris

Verified User
Joined
Apr 16, 2021
Messages
96
Location
Arcenillas
I have tried changing the name of the hostname and something has been left in the process.
Among them, the lets encrypt certificate.-

So I tried it manually because the dashboard doesn't tell me anything.

Code:
/usr/local/directadmin/scripts/letsencrypt.sh request_single kvm487.aristudio.com 4096
Setting up certificate for a hostname: kvm487.MYDOMAIN.com
touch: cannot touch '/var/www/html/.well-known/acme-challenge/letsencrypt_018e55efcfe1620117590eeca700599c': No such file or directory
chmod: cannot access '/var/www/html/.well-known/acme-challenge/letsencrypt_018e55efcfe1620117590eeca700599c': No such file or directory
server-5-135-XX-XX.da.direct was skipped due to unreachable http://server-5-135-93-68.da.direct/.well-known/acme-challenge/letsencrypt_018e55efcfe1620117590eeca700599c file.
No domains pointing to this server to generate the certificate for.

try


Code:
rm -Rf /var/www/html/.well-known/
rm -Rf  /usr/local/directadmin/data/.lego
/usr/local/directadmin/scripts/letsencrypt.sh request_single kvm487.aristudio.com 4096
Setting up certificate for a hostname: kvm487.aristudio.com
touch: cannot touch '/var/www/html/.well-known/acme-challenge/letsencrypt_fbaef21869fc4c9342f7f91cb972dfc5': No such file or directory
chmod: cannot access '/var/www/html/.well-known/acme-challenge/letsencrypt_fbaef21869fc4c9342f7f91cb972dfc5': No such file or directory
server-5-135-93-68.da.direct was skipped due to unreachable http://server-5-135-93-68.da.direct/.well-known/acme-challenge/letsencrypt_fbaef21869fc4c9342f7f91cb972dfc5 file.



mkdir -p .well-known/acme-challenge/

 ./build rewrite_confs
-bash: ./build: No such file or directory
root@kvm487:~# da build rewrite_confs
2024/07/12 18:39:18  info executing task            task=action=rewrite&value=ips
2024/07/12 18:39:18  info finished task             duration=10.457359ms task=action=rewrite&value=ips
Using 5.135.XX.XX for your server IP
PHP has been secured.
Restarting php-fpm82.
Restarting php-fpm74.
######################################################################################################################################################################################################################### 100.0%
Found /usr/local/directadmin/custombuild/mod_aclr2-1.0.0.tar.gz
Extracting /usr/local/directadmin/custombuild/mod_aclr2-1.0.0.tar.gz...
Installing mod_aclr2-1.0.0...
/var/www/build/libtool --silent --mode=compile gcc -prefer-pic -I/usr/local/include  -DLINUX -D_REENTRANT -D_GNU_SOURCE  -I/usr/include/apache  -I/usr/include/apache   -I/usr/include/apache   -c -o mod_aclr2.lo mod_aclr2.c && touch mod_aclr2.slo
/var/www/build/libtool --silent --mode=link gcc -L/usr/local/lib   -o mod_aclr2.la  -rpath /usr/lib/apache -module -avoid-version    mod_aclr2.lo
/var/www/build/instdso.sh SH_LIBTOOL='/var/www/build/libtool' mod_aclr2.la /usr/lib/apache
/var/www/build/libtool --mode=install install mod_aclr2.la /usr/lib/apache/
libtool: install: install .libs/mod_aclr2.so /usr/lib/apache/mod_aclr2.so
libtool: install: install .libs/mod_aclr2.lai /usr/lib/apache/mod_aclr2.la
libtool: install: install .libs/mod_aclr2.a /usr/lib/apache/mod_aclr2.a
libtool: install: chmod 644 /usr/lib/apache/mod_aclr2.a
libtool: install: ranlib /usr/lib/apache/mod_aclr2.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin" ldconfig -n /usr/lib/apache
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/lib/apache

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
chmod 755 /usr/lib/apache/mod_aclr2.so
[activating module `aclr' in /etc/httpd/conf/httpd.conf]
mod_aclr2 has been installed successfully.
Restarting apache.
Installing OWASP Core Rule Set for ModSecurity...
download_cached: using cached '/usr/local/directadmin/custombuild/cache/owasp-modsecurity-crs-4.4.0.tar.gz' file
Installation of ModSecurity Rule Set has been finished.
2024/07/12 18:39:21  info executing task            task=action=rewrite&value=ips
2024/07/12 18:39:21  info finished task             duration=8.625072ms task=action=rewrite&value=ips
Using 5.135.XX.XX for your server IP
Using 5.135.XX.XX for your server IP
PHP has been secured.
Restarting php-fpm82.
Restarting php-fpm74.
2024/07/12 18:39:23  info executing task            task=action=rewrite&value=nginx
2024/07/12 18:39:23  info finished task             duration=48.332309ms task=action=rewrite&value=nginx
Restarting nginx.
2024/07/12 18:39:23  info executing task            task=action=directadmin&value=reload
2024/07/12 18:39:23  info finished task             duration=19.13732ms task=action=directadmin&value=reload

/usr/local/directadmin/scripts/letsencrypt.sh request_single kvm487.MYDOMAIN.com 4096
Setting up certificate for a hostname: kvm487.MYDOMAIN.com
touch: cannot touch '/var/www/html/.well-known/acme-challenge/letsencrypt_0eb75af49be3b72c3a506cdfdc104719': No such file or directory
chmod: cannot access '/var/www/html/.well-known/acme-challenge/letsencrypt_0eb75af49be3b72c3a506cdfdc104719': No such file or directory
^C
root@kvm487:~# echo "test" >> /var/www/html/.well-known/acme-challenge/test.txt
-bash: /var/www/html/.well-known/acme-challenge/test.txt: No such file or directory
root@kvm487:~# mkdir -p /var/www/html/.well-known/acme-challenge/
root@kvm487:~# echo "test" >> /var/www/html/.well-known/acme-challenge/test.txt
root@kvm487:~# /usr/local/directadmin/scripts/letsencrypt.sh request_single kvm487.MYDOMAIN.com 4096
Setting up certificate for a hostname: kvm487.MYDOMAIN.com
server-5-135-XX-XX.da.direct was skipped due to unreachable http://server-5-135-XX-XX.da.direct/.well-known/acme-challenge/letsencrypt_c2e7cedc205c82fd9a86553c8d185b3e file.
No domains pointing to this server to generate the certificate for.

At this point are deseperate.

Below not show anything and of course reboot vps for ...
Code:
grep -r 'server-5-135-XX-XX.da.direct' /etc/httpd/ /usr/local/directadmin/data/users/ /etc/nginx/
Also try
Code:
/
/usr/local/directadmin/scripts/letsencrypt.sh request_single kvm487.MYDOMAIN.com 4096 --force
Setting up certificate for a hostname: kvm487.MYDOMAIN.com
server-5-135-XX-XX.da.direct was skipped due to unreachable http://server-5-135-XX-XX.da.direct/.well-known/acme-challenge/letsencrypt_f8fb6da5c92ee37124e3d4478ffdaede file.
No domains pointing to this server to generate the certificate for.
 
Last edited:
or check this:
 
The publication is shown as "solved" and the how to shown is not the solution to the problem in the publication, but rather part of the how to, in my case it contains an execution that did not work.

If read post and read your link you must to see that post is a problem on one part of manual: `/usr/local/directadmin/scripts/letsencrypt.sh request_single kvm487.MYDOMAIN.com 4096 --force`
Best regards.
 
you must to see that post is a problem on one part of manual: `/usr/local/directadmin/scripts/letsencrypt.sh request_single kvm487.MYDOMAIN.com 4096 --force`
In that post there is no --force in that manual, which isn't required either. There isn't a problem either in that manual.
There is a clear instruction in the post on how to handle when you keep getting the da.direct ssl certificate. Read the "if that doesn't help" part. This problem occurs only in some cases, not in all.

However, the instruction for the server certificate is recently made easier and the new command "server_cert" is also included already. But I now made it a bit more clear now by changing the order and making the old command bold.
 
I have not known how to express myself. It is not my language. I wanted to refer to another question.

The question is that the post talks about one thing, the post is already marked as solved, and someone introduces something else into the thread.

In reality, in the end, the issue was not even in the manual, since the issue was finer.

A single command, `/usr/local/directadmin/scripts/letsencrypt.sh server_cert`

The How-to is fine, perfect.

I feel that my difficulty with the language has expressed the issue poorly.
 
Back
Top