Domain points to default Apache page AFTER installing LetsEncrypt cert, will not revert to proper location

tj509

New member
Joined
Dec 12, 2021
Messages
16
I installed DirectAdmin, created a user for a site I want to host, then created a domain with that user.

I uploaded the files to public_html under the proper user directory, and the domain went to the site as it should.

I went to go install a LetsEncrypt cert, and enabled https forced redirect.

Every time I do this, it points the domain to the page that says "Apache is functioning normally."

It's so frustrating because I just saw the correct website the moment before I installed the cert. I do not understand what's happening immediately after the cert installation that causes the domain to point to the wrong directory.

Disabling SSL and redirection does not revert the problem.

Thanks for reading.
 
I went to go install a LetsEncrypt cert, and enabled https forced redirect.
Did you wait enabling forced redirect until the LE certificate was created succesfully?

To be sure, check if the domain is still in /etc/virtual/domains and domainowners and the /etc/virtual directory.
 
Did you wait enabling forced redirect until the LE certificate was created succesfully?
Funny you mention this, because at first, I absent-mindedly accidentally checked Force-redirect and then hit [Save] before I had generated the cert.

Afterward, I generated the cert, and then re-enabled force-redirect under the same LetsEncrypt page on DA.

However, I ran into the same problem in the OP on my first install (this thread being my second, clean rebuild), without the Force-Redirect-first mistake. Immediately after generating and Saving the LE cert, it redirected the page to the default Apache page, which I am assuming is the /var/www one.

How can I undo what was done so that it will connect to the /domains/USER/public_html directory again?
 
Did you wait enabling forced redirect until the LE certificate was created succesfully?

To be sure, check if the domain is still in /etc/virtual/domains and domainowners and the /etc/virtual directory.

Domain is still in all of these and owner is still correct.
 
Phew. I don't have a clue on where this has gone wrong. There is a similar thread somewhere on this forum.
Anyway, it's always best to wait until the SSL certificate is granted and working, before applying the force redirection.

I repsume the redirect from private_html to public_html is in effect (nowadays by default I believe).

The only thing which comes in to mind that quick is trying to rebuild the configs and see if that makes any difference.

cd /usr/local/directadmin/custombuild ./build rewrite_confs

If not... might be some ip issue, only odd thing is why this starts when the LE certificate is requested. Seems a bit same as in the other thread.
Hopefully it's not a bug.
 
Phew. I don't have a clue on where this has gone wrong. There is a similar thread somewhere on this forum.
Anyway, it's always best to wait until the SSL certificate is granted and working, before applying the force redirection.

I repsume the redirect from private_html to public_html is in effect (nowadays by default I believe).

The only thing which comes in to mind that quick is trying to rebuild the configs and see if that makes any difference.

cd /usr/local/directadmin/custombuild ./build rewrite_confs

If not... might be some ip issue, only odd thing is why this starts when the LE certificate is requested. Seems a bit same as in the other thread.
Hopefully it's not a bug.

Thanks for the information. I have rewrote the config and rebuild the server even, and now I am getting this:

Cannot find the letsencrypt.sh script

I am on Debian 11, and my DirectAdmin license should match.

Do you know how I can install LetsEncrypt in a way that ties in with DA?
 
Please don't quote full posts. I know what I wrote and it keeps tings more clear, thank you.

Normally, if LE is setup correctly in directadmin.conf this should be all what should be necessary to get you a new letsencrypt.sh script:
cd /usr/local/directadmin/custombuild ./build update ./build letsencrypt
 

My apologies, I only do this so the user knows I replied.

It seems LetsEncrypt was working, and that's not the issue. The issue still is the wrong directory being served when the domain is SSL-enabled.

Also for some reason my license has expired before the 30 day trial has ended. What is the reason for this? I really want to try DirectAdmin. Anyway, I started a separate thread in this category for this separate issue. Thanks for replying.
 
I've seent he seperated thread about the license, it's better to keep that part in there and wait. Maybe after fixing that, the issue in this thread might also be resolved.
 
Back
Top