I'm trying to run my Next Js app on my Hostinger VPS with OpenLiteSpeed with Node.js package installed. This morning i changed the DNS record A of my domain to my IPv4 Address of the VPS. I also changed the domain of the machine inside Hostinger.
I have two different webhost on this machine one on port 80 and 443 and one on port 4000 i want to be able to access both of the with https. Here is the info about my issue.
My domain is: api.woocrypt.com
Hint: The Certificate Authority failed to download the temporary challenge files created by Certbot. Ensure that the listed domains serve their content from the provided --webroot-path/-w and that files created there can be downloaded from the internet.
My web server is (include version): OpenLiteSpeed
The operating system my web server runs on is (include version): Ubuntu with node.js
My hosting provider, if applicable, is: Hostinger
I can login to a root shell on my machine (yes or no, or I don't know): yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel): No
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): 1.21.0
As an alternate option [which I would not recommend]:
shutdown the HTTP web server
run: certrbot certonly --standalone
restart the HTTP web server
The good news for this method is that all three steps can be automated by certbot while using hooks.
So that certbot renew will take the steps to stop/start the web server for you.
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/api.woocrypt.com/fullchain.pem
Key is saved at: /etc/letsencrypt/live/api.woocrypt.com/privkey.pem
This certificate expires on 2024-01-01.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.
Ok it works. Now i try to set these up, i'll let you know.
Firstly thanks, you really helped me.
Now it works perfectly on port 443 to access the next app, but if i try to access 7080 (OpenLiteSpeed WebAmin) chrome freaks out telling me it's a Dangeours malevolent site and that the certificate is invalid, not just not secure as before.
It's not a real issue but if there is a way to fix it would be nice.
Also does the same certificate works for port 4000 or do i have to create another one? There is just an express api on that but if i could run it in https would be nice too.